Skip to content
Snippets Groups Projects
Commit a999e678 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

CI: add a job to create and deploy the superbuild archive

parent 3f939451
No related branches found
No related tags found
3 merge requests!820Release 7.3 (integration into develop),!819Release 7.3 (integration into master),!818Release 7.3 (integration into develop)
...@@ -417,6 +417,27 @@ deploy: ...@@ -417,6 +417,27 @@ deploy:
- job: windows-10-build - job: windows-10-build
artifacts: true artifacts: true
update-archive:
tags:
- deploy
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04
stage: deploy
extends: .general
only:
- develop
before_script:
# Provision efficiently the local LFS cache before checkout
- git lfs fetch origin $CI_COMMIT_SHA
- git checkout -f -q $CI_COMMIT_SHA
script:
- ./Utilities/Maintenance/SuperbuildDownloadList.sh download build_archive
- ./CI/deploy-archive.sh build_archive
needs:
# don't push the archive if Superbuild was not successful
- job: ubuntu-xdk-prepare
artifacts: false
release-container: release-container:
image: $BUILD_IMAGE_REGISTRY/otb-alpine:3.7 image: $BUILD_IMAGE_REGISTRY/otb-alpine:3.7
stage: deploy stage: deploy
......
#!/bin/bash
#
# Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
jobs_directory=/home/otbpush/test
build_dir=$(readlink -f "$1")
scp ${build_dir}/SuperBuild-archives-*.{tar.bz2,md5} otbpush@otb5-vm2.orfeo-toolbox.org:${jobs_directory}/.
ssh otbpush@otb5-vm2.orfeo-toolbox.org \
mv ${jobs_directory}/SuperBuild-archives-*.{tar.bz2,md5} ${jobs_directory}/superbuild_archive
\ No newline at end of file
...@@ -40,6 +40,7 @@ ExternalProject_Add(OPENJPEG ...@@ -40,6 +40,7 @@ ExternalProject_Add(OPENJPEG
PREFIX OPENJPEG PREFIX OPENJPEG
URL "https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz" URL "https://github.com/uclouvain/openjpeg/archive/v2.3.1.tar.gz"
URL_MD5 3b9941dc7a52f0376694adb15a72903f URL_MD5 3b9941dc7a52f0376694adb15a72903f
DOWNLOAD_NAME openjpeg_v2.3.0.tar.gz
BINARY_DIR ${OPENJPEG_SB_BUILD_DIR} BINARY_DIR ${OPENJPEG_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX} INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION} DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
......
...@@ -50,6 +50,7 @@ CMAKE_FILES=$(find "${SB_CMAKE_DIR}" -maxdepth 1 -type f -name "External_*") ...@@ -50,6 +50,7 @@ CMAKE_FILES=$(find "${SB_CMAKE_DIR}" -maxdepth 1 -type f -name "External_*")
DOWNLOAD_NAMES= DOWNLOAD_NAMES=
mkdir -p "${DOWNLOAD_DIR}" mkdir -p "${DOWNLOAD_DIR}"
cd "${DOWNLOAD_DIR}" || echo "cannot cd to DOWNLOAD_DIR" cd "${DOWNLOAD_DIR}" || echo "cannot cd to DOWNLOAD_DIR"
echo "Downloading files to ${DOWNLOAD_DIR}/" echo "Downloading files to ${DOWNLOAD_DIR}/"
for cmake in ${CMAKE_FILES}; do for cmake in ${CMAKE_FILES}; do
...@@ -77,8 +78,10 @@ done ...@@ -77,8 +78,10 @@ done
ARCHIVE_NAME="SuperBuild-archives-$VERSION" ARCHIVE_NAME="SuperBuild-archives-$VERSION"
echo "Creating archive ${OUTPUT_DIR}/$ARCHIVE_NAME.tar.bz2" echo "Creating archive ${OUTPUT_DIR}/$ARCHIVE_NAME.tar.bz2"
cd "${OUTPUT_DIR}" || echo "cannot cd to OUTPUT_DIR"
mkdir -p "${OUTPUT_DIR}"
cd "${OUTPUT_DIR}" || echo "cannot cd to ${OUTPUT_DIR}"
touch "${DOWNLOAD_DIR}/OTBSuperBuild.readme" touch "${DOWNLOAD_DIR}/OTBSuperBuild.readme"
tar -cjf "$ARCHIVE_NAME.tar.bz2" -C "${DOWNLOAD_DIR}" "${DOWNLOAD_NAMES}" OTBSuperBuild.readme tar -cjf "$ARCHIVE_NAME.tar.bz2" -C ${DOWNLOAD_DIR} ${DOWNLOAD_NAMES} OTBSuperBuild.readme
echo "Saving md5sum to ${OUTPUT_DIR}/$ARCHIVE_NAME.md5" echo "Saving md5sum to ${OUTPUT_DIR}/$ARCHIVE_NAME.md5"
md5sum "$ARCHIVE_NAME.tar.bz2" > "$ARCHIVE_NAME.md5" md5sum "$ARCHIVE_NAME.tar.bz2" > "$ARCHIVE_NAME.md5"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment