Skip to content

Commit 5eb8d9b

Browse files
committed
Rename for clarity
1 parent d3f5dd1 commit 5eb8d9b

9 files changed

+80
-32
lines changed

.github/workflows/amphora-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ env:
2525
KAYOBE_ENVIRONMENT: ci-builder
2626
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
2727
jobs:
28-
runner-preqs:
29-
uses: ./.github/workflows/runs-on-preq.yml
28+
runner-selection:
29+
uses: ./.github/workflows/runner-selector.yml
3030
with:
3131
runner_env: ${{ inputs.runner_env }}
3232
amphora-image-build:
3333
name: Build Amphora image
3434
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
3535
environment: ${{ inputs.runner_env }}
36-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
36+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
3737
needs:
38-
- runner-preqs
38+
- runner-selection
3939
permissions: {}
4040
steps:
4141

.github/workflows/ipa-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ env:
3434
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
3535

3636
jobs:
37-
runner-preqs:
38-
uses: ./.github/workflows/runs-on-preq.yml
37+
runner-selection:
38+
uses: ./.github/workflows/runner-selector.yml
3939
with:
4040
runner_env: ${{ inputs.runner_env }}
4141
ipa-image-build:
4242
name: Build IPA images
4343
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4444
environment: ${{ inputs.runner_env }}
45-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
45+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4646
needs:
47-
- runner-preqs
47+
- runner-selection
4848
permissions: {}
4949
steps:
5050
- name: Install Package

.github/workflows/overcloud-host-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ env:
3333
KAYOBE_ENVIRONMENT: ci-builder
3434
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
3535
jobs:
36-
runner-preqs:
37-
uses: ./.github/workflows/runs-on-preq.yml
36+
runner-selection:
37+
uses: ./.github/workflows/runner-selector.yml
3838
with:
3939
runner_env: ${{ inputs.runner_env }}
4040
overcloud-host-image-build:
4141
name: Build overcloud host images
4242
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4343
environment: ${{ inputs.runner_env }}
44-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
44+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4545
needs:
46-
- runner-preqs
46+
- runner-selection
4747
permissions: {}
4848
steps:
4949
- name: Validate inputs

.github/workflows/overcloud-host-image-upload.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ on:
3535
env:
3636
ANSIBLE_FORCE_COLOR: True
3737
jobs:
38-
runner-preqs:
39-
uses: ./.github/workflows/runs-on-preq.yml
38+
runner-selection:
39+
uses: ./.github/workflows/runner-selector.yml
4040
with:
4141
runner_env: ${{ inputs.runner_env }}
4242
overcloud-host-image-upload:
4343
name: Upload overcloud host images
4444
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
4545
environment: ${{ inputs.runner_env }}
46-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
46+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4747
needs:
48-
- runner-preqs
48+
- runner-selection
4949
permissions: {}
5050
steps:
5151
- name: Validate inputs

.github/workflows/package-build-ofed.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ env:
2929
KAYOBE_ENVIRONMENT: ci-builder
3030
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
3131
jobs:
32-
runner-preqs:
33-
uses: ./.github/workflows/runs-on-preq.yml
32+
runner-selection:
33+
uses: ./.github/workflows/runner-selector.yml
3434
with:
3535
runner_env: ${{ inputs.runner_env }}
3636
overcloud-ofed-packages:
3737
name: Build OFED packages
3838
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
3939
environment: ${{ inputs.runner_env }}
40-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_image_build }}
40+
runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
4141
needs:
42-
- runner-preqs
42+
- runner-selection
4343
permissions: {}
4444
steps:
4545
- name: Install Package

.github/workflows/runner-selector.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Create output for `runs-on` variable
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
runner_env:
8+
description: 'The environment input from caller workflow'
9+
default: 'SMS Lab'
10+
required: True
11+
type: string
12+
outputs:
13+
runner_name_image_build:
14+
description: "Image builder runner name"
15+
value: ${{ jobs.define_runner.outputs.image-build-runner }}
16+
runner_name_container_image_build:
17+
description: "Container image build runner name"
18+
value: ${{ jobs.define_runner.outputs.container-image-build-runner }}
19+
runner_name_aio:
20+
description: "AiO runner name"
21+
value: ${{ jobs.define_runner.outputs.aio-runner }}
22+
23+
jobs:
24+
define_runner:
25+
environment: ${{ inputs.runner_env }}
26+
runs-on: ubuntu-latest
27+
outputs:
28+
image-build-runner: ${{ steps.builder-runner.outputs.runner_name_image_build }}
29+
container-image-build-runner: ${{ steps.container-image-build-runner.outputs.runner_name_container_image_build }}
30+
aio-runner: ${{ steps.aio-runner.outputs.runner_name_aio }}
31+
steps:
32+
- name: Set output for image builder runner
33+
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}"
34+
35+
- id: builder-runner
36+
run: echo "runner_name_image_build=${{ vars.RUNS_ON_TARGET_IMAGE_BUILDER }}" >> $GITHUB_OUTPUT
37+
38+
- name: Set output for container image build runner
39+
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_CONTAINER_IMAGE_BUILDER }}"
40+
41+
- id: container-image-build-runner
42+
run: echo "runner_name_container_image_build=${{ vars.RUNS_ON_TARGET_CONTAINER_IMAGE_BUILDER }}" >> $GITHUB_OUTPUT
43+
44+
- name: Set output for aio runner
45+
run: echo "Setting runner for ${{ inputs.runner_env }} -> ${{ vars.RUNS_ON_TARGET_AIO }}"
46+
47+
- id: aio-runner
48+
run: echo "runner_name_aio=${{ vars.RUNS_ON_TARGET_AIO }}" >> $GITHUB_OUTPUT

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ on:
7171
required: true
7272

7373
jobs:
74-
runner-preqs:
75-
uses: ./.github/workflows/runs-on-preq.yml
74+
runner-selection:
75+
uses: ./.github/workflows/runner-selector.yml
7676
with:
7777
runner_env: ${{ inputs.runner_env }}
7878
# NOTE: Runner needs unzip and nodejs packages.
7979
all-in-one:
8080
name: All in one
8181
if: ${{ inputs.if && !cancelled() }}
8282
environment: ${{ inputs.runner_env }}
83-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_aio }}
83+
runs-on: ${{ needs.runner-selection.outputs.runner_name_aio }}
8484
needs:
85-
- runner-preqs
85+
- runner-selection
8686
permissions: {}
8787
env:
8888
KAYOBE_ENVIRONMENT: ci-aio

.github/workflows/stackhpc-check-tags.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ on:
2626
env:
2727
ANSIBLE_FORCE_COLOR: True
2828
jobs:
29-
runner-preqs:
30-
uses: ./.github/workflows/runs-on-preq.yml
29+
runner-selection:
30+
uses: ./.github/workflows/runner-selector.yml
3131
with:
3232
runner_env: ${{ inputs.runner_env }}
3333

3434
check-tags:
3535
name: Check container image tags
3636
if: ${{ inputs.if && ! cancelled() }}
3737
environment: ${{ inputs.runner_env }}
38-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_aio }}
38+
runs-on: ${{ needs.runner-selection.outputs.runner_name_aio }}
3939
needs:
40-
- runner-preqs
40+
- runner-selection
4141
permissions: {}
4242
env:
4343
KAYOBE_ENVIRONMENT: ci-aio

.github/workflows/stackhpc-container-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,23 @@ jobs:
108108
run: |
109109
echo "${{ steps.datetime_tag.outputs.datetime_tag }}"
110110
111-
runner-preqs:
112-
uses: ./.github/workflows/runs-on-preq.yml
111+
runner-selection:
112+
uses: ./.github/workflows/runner-selector.yml
113113
with:
114114
runner_env: ${{ inputs.runner_env }}
115115

116116
container-image-build:
117117
name: Build Kolla container images
118118
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
119-
runs-on: ${{ needs.runner-preqs.outputs.runner_name_container_image_build }}
119+
runs-on: ${{ needs.runner-selection.outputs.runner_name_container_image_build }}
120120
timeout-minutes: 720
121121
permissions: {}
122122
strategy:
123123
fail-fast: false
124124
matrix: ${{ fromJson(needs.generate-tag.outputs.matrix) }}
125125
needs:
126126
- generate-tag
127-
- runner-preqs
127+
- runner-selection
128128
steps:
129129
- name: Install package dependencies
130130
run: |

0 commit comments

Comments
 (0)