Skip to content

Commit

Permalink
Implement an optional compiler bootstrapping phase
Browse files Browse the repository at this point in the history
  • Loading branch information
scottwittenburg authored and tgamblin committed Sep 14, 2019
1 parent 5323a5c commit 6d745a5
Show file tree
Hide file tree
Showing 10 changed files with 711 additions and 368 deletions.
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
generate ci jobs:
variables:
git_strategy: clone
script:
- "./bin/generate-gitlab-ci-yml.sh"
tags:
- "spack-k8s"
image: "spack/ubuntu:18.04"
image: "scottwittenburg/spack_ci_generator_alpine"
artifacts:
paths:
- ci-generation
Expand Down
18 changes: 12 additions & 6 deletions bin/generate-gitlab-ci-yml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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"

Expand Down
Loading

0 comments on commit 6d745a5

Please sign in to comment.