@@ -55,10 +55,10 @@ jobs:
55
55
ref : ${{ env.LATEST_RELEASE_TAG }}
56
56
fetch-depth : 0
57
57
58
- - name : Find stackhpc tofu/terraform directory
58
+ - name : Find stackhpc tofu/terraform directory at latest release
59
59
# changed in https://github.com/stackhpc/ansible-slurm-appliance/pull/541
60
60
run : |
61
- echo STACKHPC_TF_DIR =$(find environments/.stackhpc/ -type d \( -name tofu -o -name terraform \)) >> "$GITHUB_ENV"
61
+ echo STACKHPC_TF_DIR_RELEASE =$(find environments/.stackhpc/ -type d \( -name tofu -o -name terraform \)) >> "$GITHUB_ENV"
62
62
63
63
- name : Override CI_CLOUD if PR label is present
64
64
if : ${{ github.event_name == 'pull_request' }}
77
77
- name : Record debug info
78
78
run : |
79
79
echo LATEST_RELEASE_TAG: $LATEST_RELEASE_TAG
80
- echo STACKHPC_TF_DIR : $STACKHPC_TF_DIR
80
+ echo STACKHPC_TF_DIR_RELEASE : $STACKHPC_TF_DIR_RELEASE
81
81
echo CI_CLOUD: $CI_CLOUD
82
82
83
83
- name : Setup ssh
@@ -102,7 +102,7 @@ jobs:
102
102
103
103
- name : Initialise tofu
104
104
run : tofu init
105
- working-directory : ${{ env.STACKHPC_TF_DIR }}
105
+ working-directory : ${{ env.STACKHPC_TF_DIR_RELEASE }}
106
106
107
107
- name : Write clouds.yaml
108
108
run : |
@@ -124,14 +124,14 @@ jobs:
124
124
run : |
125
125
. venv/bin/activate
126
126
. environments/.stackhpc/activate
127
- cd $STACKHPC_TF_DIR
127
+ cd $STACKHPC_TF_DIR_RELEASE
128
128
tofu apply -auto-approve -var-file="${{ env.CI_CLOUD }}.tfvars"
129
129
130
130
- name : Delete infrastructure if provisioning failed
131
131
run : |
132
132
. venv/bin/activate
133
133
. environments/.stackhpc/activate
134
- cd $STACKHPC_TF_DIR
134
+ cd $STACKHPC_TF_DIR_RELEASE
135
135
tofu destroy -auto-approve -var-file="${{ env.CI_CLOUD }}.tfvars"
136
136
if : failure() && steps.provision_servers.outcome == 'failure'
137
137
@@ -192,17 +192,18 @@ jobs:
192
192
- name : Update ansible, pip and galaxy requirements
193
193
run : dev/setup-env.sh
194
194
195
- - name : Find stackhpc tofu/terraform directory
195
+ - name : Find stackhpc tofu/terraform directory in current branch
196
196
# changed in https://github.com/stackhpc/ansible-slurm-appliance/pull/541
197
197
run : |
198
- echo STACKHPC_TF_DIR =$(find environments/.stackhpc/ -type d \( -name tofu -o -name terraform \)) >> "$GITHUB_ENV"
198
+ echo STACKHPC_TF_DIR_BRANCH =$(find environments/.stackhpc/ -type d \( -name tofu -o -name terraform \)) >> "$GITHUB_ENV"
199
199
200
200
- name : Reimage login and control nodes to image in current branch
201
201
id : reimage_non_compute
202
202
run : |
203
+ echo STACKHPC_TF_DIR_BRANCH: $STACKHPC_TF_DIR_BRANCH
203
204
. venv/bin/activate
204
205
. environments/.stackhpc/activate
205
- cd $STACKHPC_TF_DIR
206
+ cd $STACKHPC_TF_DIR_BRANCH
206
207
tofu apply -auto-approve -var-file="${{ env.CI_CLOUD }}.tfvars"
207
208
208
209
- name : Configure cluster using current branch
@@ -242,6 +243,6 @@ jobs:
242
243
run : |
243
244
. venv/bin/activate
244
245
. environments/.stackhpc/activate
245
- cd $STACKHPC_TF_DIR
246
+ cd $STACKHPC_TF_DIR_BRANCH
246
247
tofu destroy -auto-approve -var-file="${{ env.CI_CLOUD }}.tfvars"
247
248
if : ${{ success() || cancelled() }}
0 commit comments