From 2ae712ad369c5812ff6d5f9625c56f6fd4160022 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 2 Dec 2025 12:12:07 +1100 Subject: [PATCH 1/5] deploy-2-start: Add --custom-scope loop to spack install and module refresh --- .github/workflows/deploy-2-start.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-2-start.yml b/.github/workflows/deploy-2-start.yml index eeac5c7f..714cb97f 100644 --- a/.github/workflows/deploy-2-start.yml +++ b/.github/workflows/deploy-2-start.yml @@ -82,6 +82,7 @@ jobs: run: | echo "spack=$(jq --compact-output --raw-output '.spack' ./config/versions.json)" >> $GITHUB_OUTPUT echo "packages=$(jq --compact-output --raw-output '."access-spack-packages"' ./config/versions.json)" >> $GITHUB_OUTPUT + echo "custom-scopes=$(jq --compact-output --raw-output '."custom-scopes" // [] | join(" ")' ./config/versions.json)" >> $GITHUB_OUTPUT - name: Get ${{ inputs.deployment-target }} ${{ inputs.deployment-type }} Remote Paths id: path @@ -205,8 +206,13 @@ jobs: spack env activate ${{ inputs.env-name }} --create --envfile ${{ vars.SPACK_YAML_LOCATION }}/${{ inputs.expected-root-spec-name }}-${{ github.run_id }}.spack.yaml # Finally, install the spack manifest - spack --debug install --fail-fast --fresh ${{ vars.SPACK_INSTALL_ADDITIONAL_ARGS }} || exit $? - spack module tcl refresh -y + spack --debug \ + $(for s in ${{ steps.versions.outputs.custom-scopes }}; do echo -n "--custom-scope $s "; done) \ + install --fail-fast --fresh ${{ vars.SPACK_INSTALL_ADDITIONAL_ARGS }} || exit $? + + spack \ + $(for s in ${{ steps.versions.outputs.custom-scopes }}; do echo -n "--custom-scope $s "; done) \ + module tcl refresh -y EOT - name: Move spack logs From 388144a653755e25b9a2c65891a60801fa7c4965 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 2 Dec 2025 12:16:45 +1100 Subject: [PATCH 2/5] Use envs rather than outputs --- .github/workflows/deploy-2-start.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-2-start.yml b/.github/workflows/deploy-2-start.yml index 714cb97f..75733386 100644 --- a/.github/workflows/deploy-2-start.yml +++ b/.github/workflows/deploy-2-start.yml @@ -186,6 +186,9 @@ jobs: - name: Deploy to ${{ inputs.deployment-target }} ${{ inputs.deployment-type }} id: deploy + env: + SCOPES: ${{ steps.versions.outputs.custom-scopes }} + SCOPES_PATH: ${{ steps.path.outputs.spack-config }}/custom/cd # ssh into deployment environment, create and activate the env, install the spack manifest. run: | ssh ${{ secrets.USER}}@${{ secrets.HOST }} -i ${{ steps.ssh.outputs.private-key-path }} /bin/bash <<'EOT' @@ -207,11 +210,11 @@ jobs: # Finally, install the spack manifest spack --debug \ - $(for s in ${{ steps.versions.outputs.custom-scopes }}; do echo -n "--custom-scope $s "; done) \ + $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope ${{ env.SCOPES_PATH }}/$s "; done) \ install --fail-fast --fresh ${{ vars.SPACK_INSTALL_ADDITIONAL_ARGS }} || exit $? spack \ - $(for s in ${{ steps.versions.outputs.custom-scopes }}; do echo -n "--custom-scope $s "; done) \ + $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope ${{ env.SCOPES_PATH }}/$s "; done) \ module tcl refresh -y EOT From e0b747957ffacc72e715a136d19ff40f45ebe87f Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Mon, 19 Jan 2026 10:57:34 +1100 Subject: [PATCH 3/5] Separate --custom-scope flag and value with = --- .github/workflows/deploy-2-start.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-2-start.yml b/.github/workflows/deploy-2-start.yml index 75733386..9d281464 100644 --- a/.github/workflows/deploy-2-start.yml +++ b/.github/workflows/deploy-2-start.yml @@ -210,11 +210,11 @@ jobs: # Finally, install the spack manifest spack --debug \ - $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope ${{ env.SCOPES_PATH }}/$s "; done) \ + $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope=${{ env.SCOPES_PATH }}/$s "; done) \ install --fail-fast --fresh ${{ vars.SPACK_INSTALL_ADDITIONAL_ARGS }} || exit $? spack \ - $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope ${{ env.SCOPES_PATH }}/$s "; done) \ + $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope=${{ env.SCOPES_PATH }}/$s "; done) \ module tcl refresh -y EOT From d85164707af6665893613c7041a92c50f6a0b633 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Mon, 19 Jan 2026 11:26:16 +1100 Subject: [PATCH 4/5] flag is --config-scope, not --custom-scope --- .github/workflows/deploy-2-start.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-2-start.yml b/.github/workflows/deploy-2-start.yml index 9d281464..289f7f47 100644 --- a/.github/workflows/deploy-2-start.yml +++ b/.github/workflows/deploy-2-start.yml @@ -210,11 +210,11 @@ jobs: # Finally, install the spack manifest spack --debug \ - $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope=${{ env.SCOPES_PATH }}/$s "; done) \ + $(for s in ${{ env.SCOPES }}; do echo -n "--config-scope=${{ env.SCOPES_PATH }}/$s "; done) \ install --fail-fast --fresh ${{ vars.SPACK_INSTALL_ADDITIONAL_ARGS }} || exit $? spack \ - $(for s in ${{ env.SCOPES }}; do echo -n "--custom-scope=${{ env.SCOPES_PATH }}/$s "; done) \ + $(for s in ${{ env.SCOPES }}; do echo -n "--config-scope=${{ env.SCOPES_PATH }}/$s "; done) \ module tcl refresh -y EOT From 4af87f83163b723b5c2b9f628a56df023d5690a1 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 20 Jan 2026 15:06:50 +1100 Subject: [PATCH 5/5] Remove erroneous get-spack-root-spec step --- .github/workflows/deploy-2-start.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/deploy-2-start.yml b/.github/workflows/deploy-2-start.yml index 289f7f47..7bcb0ef2 100644 --- a/.github/workflows/deploy-2-start.yml +++ b/.github/workflows/deploy-2-start.yml @@ -94,12 +94,6 @@ jobs: deployment-type: ${{ inputs.deployment-type }} spack-environment: ${{ inputs.env-name }} - - name: Get manifest info - id: manifest - uses: access-nri/build-cd/.github/actions/get-spack-root-spec@v8 - with: - spack-manifest-path: ${{ inputs.spack-manifest-path }} - - name: Setup SSH id: ssh uses: access-nri/actions/.github/actions/setup-ssh@main