Skip to content

Update Kubernetes image-builder submodule #50

Update Kubernetes image-builder submodule

Update Kubernetes image-builder submodule #50

Workflow file for this run

name: Build and test PR
on:
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
branches:
- main
jobs:
# This job exists so that PRs from outside the main repo are rejected
fail_on_remote:
runs-on: ubuntu-latest
steps:
- name: PR must be from a branch in the stackhpc/azimuth-images repo
run: exit ${{ github.repository == 'stackhpc/azimuth-images' && '0' || '1' }}
# We want jobs to wait in a queue for a slot to run, so as not to overload the test infra
# GitHub concurrency _almost_ does this, except the queue length is one :-(
# There is a feature request for what we need https://github.com/orgs/community/discussions/12835
# Until that is implemented, the only other viable option is a busy wait
wait_in_queue:
needs: [fail_on_remote]
runs-on: ubuntu-latest
steps:
- name: Wait for an available slot
uses: stackhpc/github-actions/workflow-concurrency@master
with:
max-concurrency: 1
# Build, publish and test the images
build_test_images:
needs: [wait_in_queue]
# Don't build draft PRs
if: ${{ !github.event.pull_request.draft }}
uses: ./.github/workflows/build_test_images.yaml
secrets: inherit
# Purge the manifest and images that we just tested from S3
purge_images:
needs: [build_test_images]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install s3cmd
run: |
sudo apt-get update -y
sudo apt-get install -y s3cmd
- name: Purge tested images from S3
run: |
source ./bin/env-vars
./bin/purge-manifest "${GITHUB_SHA}.manifest"
env:
REPO_ROOT: ${{ github.workspace }}
ENVIRONMENT: arcus
ENV_VAR_FILES: common
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}