From f0d994f40ef28f5850a41f6e83f937619026ee25 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Thu, 10 Jan 2019 09:18:10 +0100 Subject: [PATCH] [ci] More fixes --- ci/bootstrap.sh | 11 +++++++++++ ci/build.sh | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ci/bootstrap.sh b/ci/bootstrap.sh index c72e08b9..ee4611cc 100755 --- a/ci/bootstrap.sh +++ b/ci/bootstrap.sh @@ -96,9 +96,20 @@ install_miniconda() { hash -r } + +# Exports a given environment variable, verbosely +export_env() { + check_defined "${1}" + export ${1} + log_info "export ${1}=${!1}" +} + check_defined CONDA_ROOT check_defined CI_PROJECT_DIR +CONDARC=${CONDA_ROOT}/condarc +export_env CONDARC + # checks if a conda installation exists. Otherwise, installs one if [ ! -e ${CONDA_ROOT}/bin/conda ]; then install_miniconda ${CONDA_ROOT} diff --git a/ci/build.sh b/ci/build.sh index 92609b05..010a1050 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -41,8 +41,11 @@ check_defined CI_PROJECT_NAME check_defined CI_COMMIT_TAG check_defined PYTHON_VERSION +CONDARC=${CONDA_ROOT}/condarc +export_env CONDARC + BOB_PACKAGE_VERSION=`cat version.txt | tr -d '\n'`; -check_defined BOB_PACKAGE_VERSION +export_env BOB_PACKAGE_VERSION # Makes sure we activate the base environment if available run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh -- GitLab