|
2 | 2 | name: Test deployment and reimage on OpenStack |
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
5 | | - inputs: |
6 | | - use_RL8: |
7 | | - required: true |
8 | | - description: Include RL8 tests |
9 | | - type: boolean |
10 | | - default: false |
11 | 5 | push: |
12 | 6 | branches: |
13 | 7 | - main |
14 | 8 | pull_request: |
15 | 9 | jobs: |
16 | 10 | openstack: |
17 | 11 | name: openstack-ci |
18 | | - concurrency: ${{ github.ref }}-{{ matrix.os_version }} # to branch/PR + OS |
| 12 | + concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os_version }} # to branch/PR + OS |
| 14 | + cancel-in-progress: true |
19 | 15 | runs-on: ubuntu-22.04 |
20 | 16 | strategy: |
| 17 | + fail-fast: false # allow other matrix jobs to continue even if one fails |
21 | 18 | matrix: |
22 | | - os_version: [RL8, RL9] |
23 | | - rl8_selected: |
24 | | - - ${{ inputs.use_RL8 == true }} # only potentially true for workflow_dispatch |
25 | | - rl8_branch: |
26 | | - - ${{ startsWith(github.head_ref, 'rl8') == true }} # only potentially for pull_request, always false on merge |
27 | | - rl8_label: |
28 | | - - ${{ contains(github.event.pull_request.labels.*.name, 'RL8') }} # NB: needs a new commit if added after PR created |
29 | | - exclude: |
30 | | - - os_version: RL8 |
31 | | - rl8_selected: false |
32 | | - rl8_branch: false |
33 | | - rl8_label: false |
| 19 | + os_version: |
| 20 | + - RL8 |
| 21 | + - RL9 |
34 | 22 | env: |
35 | 23 | ANSIBLE_FORCE_COLOR: True |
36 | 24 | OS_CLOUD: openstack |
37 | 25 | TF_VAR_cluster_name: slurmci-${{ matrix.os_version }}-${{ github.run_number }} |
38 | 26 | CI_CLOUD: ${{ vars.CI_CLOUD }} |
| 27 | + TF_VAR_os_version: ${{ matrix.os_version }} |
39 | 28 | steps: |
40 | 29 | - uses: actions/checkout@v2 |
41 | 30 |
|
|
89 | 78 | . environments/.stackhpc/activate |
90 | 79 | cd $APPLIANCES_ENVIRONMENT_ROOT/terraform |
91 | 80 | terraform apply -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars" |
92 | | - env: |
93 | | - TF_VAR_os_version: ${{ matrix.os_version }} |
94 | 81 |
|
95 | 82 | - name: Delete infrastructure if provisioning failed |
96 | 83 | run: | |
|
99 | 86 | cd $APPLIANCES_ENVIRONMENT_ROOT/terraform |
100 | 87 | terraform destroy -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars" |
101 | 88 | if: failure() && steps.provision_servers.outcome == 'failure' |
102 | | - env: |
103 | | - TF_VAR_os_version: ${{ matrix.os_version }} |
104 | 89 |
|
105 | 90 | - name: Configure cluster |
106 | 91 | run: | |
@@ -199,8 +184,6 @@ jobs: |
199 | 184 | cd $APPLIANCES_ENVIRONMENT_ROOT/terraform |
200 | 185 | terraform destroy -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars" |
201 | 186 | if: ${{ success() || cancelled() }} |
202 | | - env: |
203 | | - TF_VAR_os_version: ${{ matrix.os_version }} |
204 | 187 |
|
205 | 188 | # - name: Delete images |
206 | 189 | # run: | |
|
0 commit comments