diff --git a/.buildkite/cryptic_repo_root/Makefile b/.buildkite/cryptic_repo_root/Makefile deleted file mode 100644 index 964e62c9b..000000000 --- a/.buildkite/cryptic_repo_root/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -verify_treehashes: - verify_treehashes --repo-root=$$(pwd) - -sign_treehashes: - sign_treehashes --repo-root=$$(pwd) diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..dd813d967 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +sign_treehashes: + cd .buildkite/cryptic_repo_root && sign_treehashes --repo-root=$$(pwd) + +verify_treehashes: + cd .buildkite/cryptic_repo_root && verify_treehashes --repo-root=$$(pwd) diff --git a/pipelines/main/launch_signed_jobs.yml.signature b/pipelines/main/launch_signed_jobs.yml.signature index 070042d14..aca0fc010 100644 --- a/pipelines/main/launch_signed_jobs.yml.signature +++ b/pipelines/main/launch_signed_jobs.yml.signature @@ -1,3 +1,2 @@ -Salted__QK��I�.��|��a��fr -��H -�$�$?�����]$��ԅG0�8B���c!ª�4���=f���1v�0�9�4S���-| \ No newline at end of file +Salted__}�2|�����o&2 - echo "${line}" - exit 1 - fi + # Panic if we don't have the same number of items as our column names: + if [[ "${#line_array[@]}" != "${#var_names[@]}" ]]; then + echo "ERROR: The following line does not contain ${#var_names[@]} columns as we would expect from the header of ${ARCHES_FILE}" >&2 + echo "${line}" + exit 1 + fi - # Loop over columns, bind values to their column name - for idx in "${!var_names[@]}"; do - # Get the name and value - name="$(xargs <<<"${var_names[${idx}]}")" - value="$(xargs <<<"${line_array[${idx}]}")" + # Loop over columns, bind values to their column name + for idx in "${!var_names[@]}"; do + # Get the name and value + name="$(xargs <<<"${var_names[${idx}]}")" + value="$(xargs <<<"${line_array[${idx}]}")" - # Apply default values to our special `.` token - if [[ "${value}" == "." ]]; then - value="${defaults_map[${name}]:-}" - fi + # Apply default values to our special `.` token + if [[ "${value}" == "." ]]; then + value="${defaults_map[${name}]:-}" + fi - echo -n "${name}=\"${value}\" " - done - echo + echo -n "${name}=\"${value}\" " + done + echo done diff --git a/utilities/arches_pipeline_upload.sh b/utilities/arches_pipeline_upload.sh index 55dc766f2..5ac88acde 100644 --- a/utilities/arches_pipeline_upload.sh +++ b/utilities/arches_pipeline_upload.sh @@ -1,5 +1,6 @@ #!/bin/bash set -eou pipefail +shopt -s nullglob # This script reads in an `.arches` file, processes the columns and default value mappings # within it, and outputs an environment block (e.g. a line of the form "X=a B= C=123") for @@ -9,19 +10,19 @@ set -eou pipefail ARCHES_FILE="${1:-}" if [[ ! -f "${ARCHES_FILE}" ]] ; then - echo "Arches file does not exist: '${ARCHES_FILE}'" - exit 1 + echo "Arches file does not exist: '${ARCHES_FILE}'" + exit 1 fi YAML_FILE="${2:-}" if [[ ! -f "${YAML_FILE}" ]] ; then - echo "YAML file does not exist: '${YAML_FILE}'" - exit 1 + echo "YAML file does not exist: '${YAML_FILE}'" + exit 1 fi SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -"${BASH}" "${SCRIPT_DIR}/arches_env.sh" "${ARCHES_FILE:?}" | while read env_map; do - # Export the environment mappings, then launch the yaml file - eval "export ${env_map}" - buildkite-agent pipeline upload "${YAML_FILE}" +"${BASH}" "${SCRIPT_DIR}/arches_env.sh" "${ARCHES_FILE}" | while read env_map; do + # Export the environment mappings, then launch the yaml file + eval "export ${env_map}" + buildkite-agent pipeline upload "${YAML_FILE}" done diff --git a/utilities/calc_version_envs.sh b/utilities/calc_version_envs.sh index d9dd6dd2e..c0f2144e7 100755 --- a/utilities/calc_version_envs.sh +++ b/utilities/calc_version_envs.sh @@ -4,7 +4,7 @@ echo "--- Print the full and short commit hashes" SHORT_COMMIT_LENGTH=10 LONG_COMMIT="$(git rev-parse HEAD)" SHORT_COMMIT="$(echo ${LONG_COMMIT} | cut -c1-${SHORT_COMMIT_LENGTH})" -ARTIFACT_FILENAME="julia-${SHORT_COMMIT}-${PLATFORM?}${TAR_ARCH?}.tar.gz" +ARTIFACT_FILENAME="julia-${SHORT_COMMIT}-${OS?}${TAR_ARCH?}.tar.gz" JULIA_BINARYDIST="$(make print-JULIA_BINARYDIST_FILENAME ${MAKE_FLAGS?} | cut -c27- | tr -s ' ').tar.gz" JULIA_INSTALL_DIR="julia-${SHORT_COMMIT}" JULIA_BINARY="${JULIA_INSTALL_DIR}/bin/julia"