|
2 | 2 | name: Test deployment and reimage on OpenStack |
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
| 5 | + inputs: |
| 6 | + use_RL9: |
| 7 | + required: true |
| 8 | + description: Include RL9 tests |
| 9 | + type: boolean |
| 10 | + default: false |
5 | 11 | push: |
6 | 12 | branches: |
7 | 13 | - main |
8 | 14 | pull_request: |
9 | 15 | jobs: |
10 | 16 | openstack: |
11 | 17 | name: openstack-ci |
12 | | - concurrency: ${{ github.ref }} # to branch/PR |
| 18 | + concurrency: ${{ github.ref }}-{{ matrix.os_version }} # to branch/PR + OS |
13 | 19 | runs-on: ubuntu-20.04 |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + os_version: [RL8, RL9] |
| 23 | + rl9_selected: |
| 24 | + - ${{ inputs.use_RL9 == true }} # only potentially true for workflow_dispatch |
| 25 | + rl9_branch: |
| 26 | + - ${{ startsWith(github.head_ref, 'rl9') == true }} # only potentially for pull_request, always false on merge |
| 27 | + exclude: |
| 28 | + - os_version: RL9 |
| 29 | + rl9_selected: false |
| 30 | + rl9_branch: false |
14 | 31 | env: |
15 | 32 | ANSIBLE_FORCE_COLOR: True |
16 | 33 | OS_CLOUD: openstack |
17 | | - TF_VAR_cluster_name: ci${{ github.run_id }} |
| 34 | + TF_VAR_cluster_name: slurmci-${{ matrix.os_version }}-${{ github.run_id }} |
18 | 35 | CI_CLOUD: ${{ vars.CI_CLOUD }} |
19 | 36 | steps: |
20 | 37 | - uses: actions/checkout@v2 |
|
69 | 86 | . environments/.stackhpc/activate |
70 | 87 | cd $APPLIANCES_ENVIRONMENT_ROOT/terraform |
71 | 88 | terraform apply -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars" |
| 89 | + env: |
| 90 | + TF_VAR_os_version: ${{ matrix.os_version }} |
72 | 91 |
|
73 | 92 | - name: Delete infrastructure if provisioning failed |
74 | 93 | run: | |
|
77 | 96 | cd $APPLIANCES_ENVIRONMENT_ROOT/terraform |
78 | 97 | terraform destroy -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars" |
79 | 98 | if: failure() && steps.provision_servers.outcome == 'failure' |
| 99 | + env: |
| 100 | + TF_VAR_os_version: ${{ matrix.os_version }} |
80 | 101 |
|
81 | 102 | - name: Configure cluster |
82 | 103 | run: | |
@@ -175,6 +196,8 @@ jobs: |
175 | 196 | cd $APPLIANCES_ENVIRONMENT_ROOT/terraform |
176 | 197 | terraform destroy -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars" |
177 | 198 | if: ${{ success() || cancelled() }} |
| 199 | + env: |
| 200 | + TF_VAR_os_version: ${{ matrix.os_version }} |
178 | 201 |
|
179 | 202 | # - name: Delete images |
180 | 203 | # run: | |
|
0 commit comments