Skip to content

Commit e10923a

Browse files
MaxBed4dmarkgoddard
authored andcommitted
CI: Update aio jobs to run on ARC
The jobs now run in containers, so some changes are necessary.
1 parent 6c14370 commit e10923a

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,26 @@ jobs:
7070
all-in-one:
7171
name: All in one
7272
if: inputs.if
73-
runs-on: [self-hosted, stackhpc-kayobe-config-aio]
73+
runs-on: arc-skc-aio-runner
7474
permissions: {}
7575
env:
7676
KAYOBE_ENVIRONMENT: ci-aio
7777
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
7878
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
7979
steps:
80+
- name: Install Package
81+
uses: ConorMacBride/install-package@main
82+
with:
83+
apt: build-essential git unzip nodejs python3 python3-pip python3-wheel python-is-python3
84+
8085
- uses: actions/checkout@v4
8186
with:
8287
submodules: true
8388

89+
- name: Make sure dockerd is running and test Docker.
90+
run: |
91+
docker run --rm hello-world
92+
8493
- name: Output image tag
8594
id: image_tag
8695
run: |
@@ -209,11 +218,11 @@ jobs:
209218
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
210219
- name: Pull latest Kayobe image
211220
run: |
212-
sudo docker image pull $KAYOBE_IMAGE
221+
docker image pull $KAYOBE_IMAGE
213222
214223
- name: Run growroot
215224
run: |
216-
sudo -E docker run -t --rm \
225+
docker run -t --rm \
217226
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
218227
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
219228
$KAYOBE_IMAGE \
@@ -223,7 +232,7 @@ jobs:
223232

224233
- name: Host configure
225234
run: |
226-
sudo -E docker run -t --rm \
235+
docker run -t --rm \
227236
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
228237
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
229238
$KAYOBE_IMAGE \
@@ -233,7 +242,7 @@ jobs:
233242

234243
- name: Service deploy
235244
run: |
236-
sudo -E docker run -t --rm \
245+
docker run -t --rm \
237246
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
238247
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
239248
$KAYOBE_IMAGE \
@@ -243,7 +252,7 @@ jobs:
243252

244253
- name: Configure aio resources
245254
run: |
246-
sudo -E docker run -t --rm \
255+
docker run -t --rm \
247256
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
248257
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
249258
$KAYOBE_IMAGE \
@@ -254,7 +263,7 @@ jobs:
254263
- name: Tempest tests
255264
run: |
256265
mkdir -p tempest-artifacts
257-
sudo -E docker run -t --rm \
266+
docker run -t --rm \
258267
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
259268
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
260269
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
@@ -284,5 +293,5 @@ jobs:
284293

285294
- name: Prune Docker images over 1 week old
286295
# May fail if another prune is running
287-
run: sudo docker image prune --all --force --filter until=168h || true
296+
run: docker image prune --all --force --filter until=168h || true
288297
if: always()

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ jobs:
7878
https_proxy: ${{ inputs.https_proxy }}
7979
no_proxy: ${{ inputs.no_proxy }}
8080

81+
# Setting KAYOBE_USER_UID and KAYOBE_USER_GID to 1001 to match docker's defaults
82+
# so that docker can run as a privileged user within the Kayobe image.
8183
- name: Build and push Docker image
8284
uses: docker/build-push-action@v3
8385
with:
@@ -86,6 +88,8 @@ jobs:
8688
build-args: |
8789
http_proxy=${{ inputs.http_proxy }}
8890
https_proxy=${{ inputs.https_proxy }}
91+
KAYOBE_USER_UID=1001
92+
KAYOBE_USER_GID=1001
8993
push: true
9094
tags: ${{ steps.meta.outputs.tags }}
9195
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)