Skip to content

Commit a9b8224

Browse files
authored
Merge pull request #1646 from stackhpc/arc-aio
Make SMS the default runner environment
2 parents f83ae51 + 45d731d commit a9b8224

File tree

1 file changed

+17
-26
lines changed

1 file changed

+17
-26
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ name: All in one
77
on:
88
workflow_call:
99
inputs:
10-
runner:
11-
required: false
10+
runner_env:
11+
description: Which cloud to run on?
1212
type: string
13-
description: 'Runner name'
14-
default: 'arc-skc-aio-runner'
13+
default: SMS Lab
1514
kayobe_image:
1615
description: Kayobe container image
1716
type: string
@@ -40,18 +39,6 @@ on:
4039
description: Default network interface name
4140
type: string
4241
default: ens3
43-
vm_flavor:
44-
description: Flavor for the all-in-one VM
45-
type: string
46-
default: en1.medium
47-
vm_network:
48-
description: Network for the all-in-one VM
49-
type: string
50-
default: stackhpc-ci
51-
vm_subnet:
52-
description: Subnet for the all-in-one VM
53-
type: string
54-
default: stackhpc-ci
5542
OS_CLOUD:
5643
description: Name of cloud in clouds.yaml
5744
type: string
@@ -87,11 +74,18 @@ on:
8774
required: true
8875

8976
jobs:
77+
runner-selection:
78+
uses: ./.github/workflows/runner-selector.yml
79+
with:
80+
runner_env: ${{ inputs.upgrade == true && 'Leafcloud' || inputs.runner_env }}
9081
# NOTE: Runner needs unzip and nodejs packages.
9182
all-in-one:
9283
name: All in one
9384
if: ${{ inputs.if && !cancelled() }}
94-
runs-on: ${{ inputs.runner }}
85+
environment: ${{ inputs.upgrade == true && 'Leafcloud' || inputs.runner_env }}
86+
runs-on: ${{ needs.runner-selection.outputs.runner_name_aio }}
87+
needs:
88+
- runner-selection
9589
permissions: {}
9690
env:
9791
KAYOBE_ENVIRONMENT: ci-aio
@@ -170,9 +164,9 @@ jobs:
170164
aio_vm_interface = "${{ env.VM_INTERFACE }}"
171165
aio_vm_name = "${{ env.VM_NAME }}"
172166
aio_vm_image = "${{ env.VM_IMAGE }}"
173-
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
174-
aio_vm_network = "${{ env.VM_NETWORK }}"
175-
aio_vm_subnet = "${{ env.VM_SUBNET }}"
167+
aio_vm_flavor = "${{ vars.HOST_IMAGE_BUILD_FLAVOR }}"
168+
aio_vm_network = "${{ vars.HOST_IMAGE_BUILD_NETWORK }}"
169+
aio_vm_subnet = "${{ vars.HOST_IMAGE_BUILD_SUBNET }}"
176170
aio_vm_volume_size = "${{ env.VM_VOLUME_SIZE }}"
177171
aio_vm_tags = ${{ env.VM_TAGS }}
178172
EOF
@@ -181,9 +175,6 @@ jobs:
181175
SSH_USERNAME: "${{ inputs.ssh_username }}"
182176
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
183177
VM_IMAGE: ${{ steps.image_name.outputs.image_name }}
184-
VM_FLAVOR: ${{ inputs.vm_flavor }}
185-
VM_NETWORK: ${{ inputs.vm_network }}
186-
VM_SUBNET: ${{ inputs.vm_subnet }}
187178
VM_INTERFACE: ${{ inputs.vm_interface }}
188179
VM_VOLUME_SIZE: ${{ inputs.upgrade && '65' || '50' }}
189180
VM_TAGS: '["skc-ci-aio", "PR=${{ github.event.number }}"]'
@@ -192,7 +183,7 @@ jobs:
192183
run: terraform plan
193184
working-directory: ${{ github.workspace }}/terraform/aio
194185
env:
195-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
186+
OS_CLOUD: ${{ vars.OS_CLOUD }}
196187
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
197188
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
198189

@@ -213,7 +204,7 @@ jobs:
213204
exit 1
214205
working-directory: ${{ github.workspace }}/terraform/aio
215206
env:
216-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
207+
OS_CLOUD: ${{ vars.OS_CLOUD }}
217208
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
218209
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
219210

@@ -517,7 +508,7 @@ jobs:
517508
run: terraform destroy -auto-approve
518509
working-directory: ${{ github.workspace }}/terraform/aio
519510
env:
520-
OS_CLOUD: ${{ inputs.OS_CLOUD }}
511+
OS_CLOUD: ${{ vars.OS_CLOUD }}
521512
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
522513
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
523514
if: always()

0 commit comments

Comments
 (0)