@@ -139,23 +139,14 @@ jobs:
139
139
- generate-tag
140
140
- runner-selection
141
141
steps :
142
- - name : Purge workspace (Arm runner only)
143
- if : runner.arch == 'ARM64'
142
+ - name : Purge workspace
144
143
run : sudo rm -rf "$GITHUB_WORKSPACE"/*
145
144
146
145
- name : Install package dependencies
147
146
run : |
148
147
sudo apt update
149
148
sudo apt install -y build-essential git unzip nodejs python3-wheel python3-pip python3-venv curl jq wget
150
149
151
- - name : Install gh
152
- run : |
153
- sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
154
- sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
155
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
156
- sudo apt update
157
- sudo apt install gh -y
158
-
159
150
- name : Checkout
160
151
uses : actions/checkout@v4
161
152
with :
@@ -232,7 +223,7 @@ jobs:
232
223
args="$args -e kolla_tag=${{ steps.write-kolla-tag.outputs.kolla-tag }}"
233
224
fi
234
225
args="$args -e stackhpc_repo_mirror_auth_proxy_enabled=true"
235
- args="$args -e kolla_build_log_path=/var/log/kolla -build-${{ steps.write- kolla-tag.outputs.kolla-tag }} .log"
226
+ args="$args -e kolla_build_log_path=$GITHUB_WORKSPACE/image -build-logs/ kolla-build-overcloud .log"
236
227
args="$args -e base_path=$GITHUB_WORKSPACE/opt/kayobe"
237
228
source venvs/kayobe/bin/activate &&
238
229
source src/kayobe-config/kayobe-env --environment ci-builder &&
@@ -241,12 +232,6 @@ jobs:
241
232
KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
242
233
if : inputs.overcloud
243
234
244
- - name : Copy overcloud container image build logs to output directory
245
- run : |
246
- sudo mv /var/log/kolla-build-${{ steps.write-kolla-tag.outputs.kolla-tag }}.log \
247
- image-build-logs/kolla-build-overcloud.log
248
- if : inputs.overcloud
249
-
250
235
- name : Copy build configs to output directory
251
236
run : sudo cp -rnL "$GITHUB_WORKSPACE/opt/kayobe/etc/kolla/"* image-build-logs/
252
237
if : inputs.overcloud
@@ -377,92 +362,31 @@ jobs:
377
362
run : |
378
363
sudo apt update
379
364
sudo apt install -y git unzip python3-wheel python3-pip python3-venv curl jq wget openssh-server openssh-client
365
+
380
366
- name : Install gh
381
367
run : |
382
368
sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
383
369
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
384
370
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
385
371
sudo apt update
386
372
sudo apt install gh -y
387
- - name : Checkout Kayobe Config
388
- uses : actions/checkout@v4
389
- with :
390
- path : src/kayobe-config
391
-
392
- - name : Install Kayobe
393
- run : |
394
- mkdir -p venvs &&
395
- pushd venvs &&
396
- python3 -m venv kayobe &&
397
- source kayobe/bin/activate &&
398
- pip install -U pip &&
399
- pip install -r ../src/kayobe-config/requirements.txt
400
- # Required for Pulp auth proxy deployment and Docker registry login.
401
- # Normally installed during host configure.
402
- - name : Install Docker Python SDK
403
- run : |
404
- sudo pip install docker
405
- - name : Configure localhost as a seed
406
- run : |
407
- cat > src/kayobe-config/etc/kayobe/environments/ci-builder/inventory/hosts << EOF
408
- # A 'seed' host used for building images.
409
- # Use localhost for container image builds.
410
- [seed]
411
- localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
412
- EOF
413
- # See etc/kayobe/ansible/roles/pulp_auth_proxy/README.md for details.
414
- # NOTE: We override pulp_auth_proxy_conf_path to a path shared by the
415
- # runner and dind containers.
416
- - name : Deploy an authenticating package repository mirror proxy
417
- run : |
418
- source venvs/kayobe/bin/activate &&
419
- source src/kayobe-config/kayobe-env --environment ci-builder &&
420
- kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/pulp-auth-proxy.yml -e pulp_auth_proxy_conf_path=/home/runner/_work/pulp_proxy
421
- env :
422
- KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
423
373
424
374
- name : Download artifacts
425
375
uses : actions/download-artifact@v4
426
376
427
377
- name : Combine pushed images lists
428
378
run : |
429
379
find . -name 'push-attempt-images.txt' -exec cat {} + > all-pushed-images.txt
430
- - name : Log in to Docker registry
431
- run : |
432
- source venvs/kayobe/bin/activate &&
433
- source src/kayobe-config/kayobe-env --environment ci-builder &&
434
- kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/docker-registry-login.yml
435
- env :
436
- KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
437
380
438
- - name : Create and Push Docker Manifests
439
- run : |
440
- set -ex
441
- mkdir -p logs
442
- images=$(cat all-pushed-images.txt | sort | uniq)
443
- # Filter out Ubuntu and Rocky Bifrost images
444
- manifest_images=$(echo "$images" | grep -E '.*-(amd64|aarch64)$' | sed -E 's/-(amd64|aarch64)$//' | sort | uniq)
445
- if [ -z "$manifest_images" ]; then
446
- echo "No Rocky overcloud images found. Skipping manifest creation." | tee -a logs/manifest-creation.log
447
- exit 0
448
- fi
449
- for base_image in $manifest_images; do
450
- arch_images=""
451
- for arch in amd64 aarch64; do
452
- arch_image="${base_image}-${arch}"
453
- # Check if the image exists in the registry
454
- if docker manifest inspect "$arch_image" > /dev/null 2>&1; then
455
- arch_images="$arch_images $arch_image"
456
- fi
457
- done
458
- if [ -n "$arch_images" ]; then
459
- echo "Creating manifest for $base_image with images:$arch_images" | tee -a logs/manifest-creation.log
460
- docker manifest create "$base_image" $arch_images | tee -a logs/manifest-creation.log
461
- docker manifest push "$base_image" | tee -a logs/manifest-creation.log
462
- else
463
- echo "No images found for $base_image, skipping." | tee -a logs/manifest-creation.log
464
- fi
465
- done
381
+ - name : Log in to container registry
382
+ uses : docker/login-action@v3
383
+ with :
384
+ registry : ark.stackhpc.com
385
+ username : ${{ secrets.RLS_TRAIN_CI_ARK_REGISTRY_USER }}
386
+ password : ${{ secrets.RLS_TRAIN_CI_ARK_REGISTRY_PASS }}
387
+
388
+ - name : Create and push Docker manifests
389
+ run : tools/multiarch-manifests.sh
466
390
467
391
- name : Upload manifest logs
468
392
uses : actions/upload-artifact@v4
0 commit comments