diff --git a/gitlab/build.sh b/gitlab/build.sh index c679009e95c3bdb4b1e4d7b58e2b1655c087a8cd..4619f6aa50f361f6dbeb11b893f6aa04029ec2f9 100755 --- a/gitlab/build.sh +++ b/gitlab/build.sh @@ -20,12 +20,17 @@ BLDOPT="${BLDOPT} --variant-config-files ${SCRIPTS_DIR}/conda_build_config.yaml" BLDOPT="${BLDOPT} --python=${PYTHON_VERSION}" if [ -n "${BOB_TEST_ONLY}" ]; then + log_info "Running ${CONDA_ROOT}/bin/conda build ${BLDOPT} --output conda to generate package name..." tarball=$(${CONDA_ROOT}/bin/conda build ${BLDOPT} --output conda) + if [ -z "${tarball}" ]; then + log_info "Package ${CI_PROJECT_PATH} is NOT supposed to be built for ${OS_SLUG}/python${PYTHON_VERSION} (cannot generate tarball name). Skipping..." + exit 0 + fi log_info "Only testing package ${tarball}..." set_conda_channels ${VISIBILITY} ${CI_COMMIT_TAG} if [ ! -r "${tarball}" ]; then log_info "Package ${tarball} does not exist locally - checking channel ${CONDA_CHANNELS[0]}..." - remote_name="${CONDA_CHANNELS[0]}/${OSNAME}-64/$(basename ${tarball})" + remote_name="${CONDA_CHANNELS[0]}/${OS_SLUG}/$(basename ${tarball})" if url_exists ${remote_name}; then log_info "Conda tarball exists in remote location, downloading..." url_get ${tarball} ${remote_name}