Commit 8d7d17b7 authored by André Anjos's avatar André Anjos 💬
Browse files

[ci] Better reporting

parent f0d994f4
Pipeline #25792 failed with stages
in 2 minutes and 23 seconds
...@@ -56,6 +56,7 @@ check_defined() { ...@@ -56,6 +56,7 @@ check_defined() {
log_error "Variable ${1} is zero-length - aborting..."; log_error "Variable ${1} is zero-length - aborting...";
exit 1 exit 1
fi fi
log_info "${1}=${!1}"
} }
...@@ -97,18 +98,11 @@ install_miniconda() { ...@@ -97,18 +98,11 @@ install_miniconda() {
} }
# Exports a given environment variable, verbosely
export_env() {
check_defined "${1}"
export ${1}
log_info "export ${1}=${!1}"
}
check_defined CONDA_ROOT check_defined CONDA_ROOT
check_defined CI_PROJECT_DIR check_defined CI_PROJECT_DIR
CONDARC=${CONDA_ROOT}/condarc export CONDARC=${CONDA_ROOT}/condarc
export_env CONDARC check_defined CONDARC
# checks if a conda installation exists. Otherwise, installs one # checks if a conda installation exists. Otherwise, installs one
if [ ! -e ${CONDA_ROOT}/bin/conda ]; then if [ ! -e ${CONDA_ROOT}/bin/conda ]; then
...@@ -119,7 +113,7 @@ run_cmd mkdir -p ${CONDA_ROOT}/pkgs ...@@ -119,7 +113,7 @@ run_cmd mkdir -p ${CONDA_ROOT}/pkgs
run_cmd touch ${CONDA_ROOT}/pkgs/urls run_cmd touch ${CONDA_ROOT}/pkgs/urls
run_cmd touch ${CONDA_ROOT}/pkgs/urls.txt run_cmd touch ${CONDA_ROOT}/pkgs/urls.txt
cp -fv ${CI_PROJECT_DIR}/bob/devtools/data/base-condarc ${CONDARC} run_cmd cp -fv ${CI_PROJECT_DIR}/bob/devtools/data/base-condarc ${CONDARC}
echo "channels:" >> ${CONDARC} echo "channels:" >> ${CONDARC}
echo " - http://www.idiap.ch/public/conda" >> ${CONDARC} echo " - http://www.idiap.ch/public/conda" >> ${CONDARC}
echo " - defaults" >> ${CONDARC} echo " - defaults" >> ${CONDARC}
......
...@@ -25,32 +25,26 @@ check_defined() { ...@@ -25,32 +25,26 @@ check_defined() {
log_error "Variable ${1} is zero-length - aborting..."; log_error "Variable ${1} is zero-length - aborting...";
exit 1 exit 1
fi fi
log_info "${1}=${!1}"
} }
# Exports a given environment variable, verbosely
export_env() {
check_defined "${1}"
export ${1}
log_info "export ${1}=${!1}"
}
check_defined CONDA_ROOT check_defined CONDA_ROOT
check_defined CI_PROJECT_DIR check_defined CI_PROJECT_DIR
check_defined CI_PROJECT_NAME check_defined CI_PROJECT_NAME
check_defined CI_COMMIT_TAG
check_defined PYTHON_VERSION check_defined PYTHON_VERSION
CONDARC=${CONDA_ROOT}/condarc export CONDARC=${CONDA_ROOT}/condarc
export_env CONDARC check_defined CONDARC
BOB_PACKAGE_VERSION=`cat version.txt | tr -d '\n'`; export BOB_PACKAGE_VERSION=`cat version.txt | tr -d '\n'`;
export_env BOB_PACKAGE_VERSION check_defined BOB_PACKAGE_VERSION
# Makes sure we activate the base environment if available # Makes sure we activate the base environment if available
run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh
run_cmd conda activate base run_cmd conda activate base
export_env PATH export PATH
check_defined PATH
if [ -z "${CI_COMMIT_TAG}" ]; then #building beta if [ -z "${CI_COMMIT_TAG}" ]; then #building beta
channel="http://www.idiap.ch/public/conda/label/beta" channel="http://www.idiap.ch/public/conda/label/beta"
......
Supports Markdown
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