Commit d230d03d authored by Cédric Traizet's avatar Cédric Traizet
Browse files

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

parent 3f2d0cb8
......@@ -417,6 +417,27 @@ deploy:
- job: windows-10-build
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:
image: $BUILD_IMAGE_REGISTRY/otb-alpine:3.7
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
......@@ -39,6 +39,7 @@ ADD_SUPERBUILD_CMAKE_VAR(OPENJPEG PNG_LIBRARY)
ExternalProject_Add(OPENJPEG
PREFIX OPENJPEG
URL "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz"
DOWNLOAD_NAME openjpeg_v2.3.0.tar.gz
URL_MD5 6a1f8aaa1fe55d2088e3a9c942e0f698
BINARY_DIR ${OPENJPEG_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
......
......@@ -50,6 +50,7 @@ CMAKE_FILES=$(find "${SB_CMAKE_DIR}" -maxdepth 1 -type f -name "External_*")
DOWNLOAD_NAMES=
mkdir -p "${DOWNLOAD_DIR}"
cd "${DOWNLOAD_DIR}" || echo "cannot cd to DOWNLOAD_DIR"
echo "Downloading files to ${DOWNLOAD_DIR}/"
for cmake in ${CMAKE_FILES}; do
......@@ -77,8 +78,10 @@ done
ARCHIVE_NAME="SuperBuild-archives-$VERSION"
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"
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"
md5sum "$ARCHIVE_NAME.tar.bz2" > "$ARCHIVE_NAME.md5"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment