summaryrefslogtreecommitdiff
path: root/bin/generate-gitlab-ci-yml.sh
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2019-07-16 08:36:31 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2019-09-13 22:57:15 -0700
commit6d745a56fd1358667047d22ba183140a8ec0f5f5 (patch)
tree7f9bce20f0c48c43ecbcb678262a8900d93bec6d /bin/generate-gitlab-ci-yml.sh
parent5323a5cff90fdd647dd9150e64561b26db417d94 (diff)
downloadspack-6d745a56fd1358667047d22ba183140a8ec0f5f5.tar.gz
spack-6d745a56fd1358667047d22ba183140a8ec0f5f5.tar.bz2
spack-6d745a56fd1358667047d22ba183140a8ec0f5f5.tar.xz
spack-6d745a56fd1358667047d22ba183140a8ec0f5f5.zip
Implement an optional compiler bootstrapping phase
Diffstat (limited to 'bin/generate-gitlab-ci-yml.sh')
-rwxr-xr-xbin/generate-gitlab-ci-yml.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/bin/generate-gitlab-ci-yml.sh b/bin/generate-gitlab-ci-yml.sh
index 1a021785d3..b414d6c404 100755
--- a/bin/generate-gitlab-ci-yml.sh
+++ b/bin/generate-gitlab-ci-yml.sh
@@ -19,8 +19,10 @@ if [ -z "${SPACK_RELEASE_ENVIRONMENT_PATH}" ] ; then
fi
if [ -z "${CDASH_AUTH_TOKEN}" ] ; then
- echo "ERROR: missing variable: CDASH_AUTH_TOKEN" >&2
- exit 1
+ echo "WARNING: missing variable: CDASH_AUTH_TOKEN" >&2
+else
+ token_file="${temp_dir}/cdash_auth_token"
+ echo ${CDASH_AUTH_TOKEN} > ${token_file}
fi
if [ -z "${SPACK_RELEASE_ENVIRONMENT_REPO}" ] ; then
@@ -51,11 +53,14 @@ fi
cd $env_dir
-token_file="${temp_dir}/cdash_auth_token"
-echo ${CDASH_AUTH_TOKEN} > ${token_file}
+# The next commands generates the .gitlab-ci.yml (and optionally creates a
+# buildgroup in cdash)
+RELEASE_JOBS_ARGS=("--output-file" "${gen_ci_file}")
+if [ ! -z "${token_file}" ]; then
+ RELEASE_JOBS_ARGS+=("--cdash-credentials" "${token_file}")
+fi
-# This commands generates the .gitlab-ci.yml and creates buildgroup in cdash
-spack release-jobs --force --output-file ${gen_ci_file} --cdash-credentials ${token_file}
+spack release-jobs "${RELEASE_JOBS_ARGS[@]}"
if [[ $? -ne 0 ]]; then
echo "spack release-jobs command failed"
@@ -64,6 +69,7 @@ fi
cp ${gen_ci_file} "${original_directory}/.gitlab-ci.yml"
+# Remove global from here, it's clobbering people git identity config
git config --global user.email "robot@spack.io"
git config --global user.name "Build Robot"