![azimuth-ci-bot[bot]](/assets/img/avatar_default.png)
* Update azimuth-images to 0.10.0 * Add Kubernetes 1.30 to CI --------- Co-authored-by: mkjpryor <642657+mkjpryor@users.noreply.github.com> Co-authored-by: Matt Pryor <matt@stackhpc.com>
116 lines
3.9 KiB
YAML
116 lines
3.9 KiB
YAML
name: Ensure CAPI images
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
type: string
|
|
description: The Git ref under test.
|
|
required: true
|
|
outputs:
|
|
kube-1-28-image:
|
|
value: ${{ jobs.produce_outputs.outputs.kube-1-28-image }}
|
|
kube-1-28-version:
|
|
value: ${{ jobs.produce_outputs.outputs.kube-1-28-version }}
|
|
kube-1-29-image:
|
|
value: ${{ jobs.produce_outputs.outputs.kube-1-29-image }}
|
|
kube-1-29-version:
|
|
value: ${{ jobs.produce_outputs.outputs.kube-1-29-version }}
|
|
kube-1-30-image:
|
|
value: ${{ jobs.produce_outputs.outputs.kube-1-30-image }}
|
|
kube-1-30-version:
|
|
value: ${{ jobs.produce_outputs.outputs.kube-1-30-version }}
|
|
|
|
jobs:
|
|
image_manifest:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
manifest: ${{ steps.images.outputs.manifest }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
|
|
- name: Fetch image details
|
|
id: images
|
|
run: |
|
|
VN="$(jq -r '.["azimuth-images"]' ./dependencies.json)"
|
|
MANIFEST="$(curl -fsSL "https://github.com/stackhpc/azimuth-images/releases/download/${VN}/manifest.json")"
|
|
echo "manifest=$(jq -c . <<< "$MANIFEST")" >> $GITHUB_OUTPUT
|
|
|
|
ensure_image:
|
|
runs-on: ubuntu-latest
|
|
needs: [image_manifest]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: kube-1-28
|
|
image: ${{ fromJSON(needs.image_manifest.outputs.manifest).kubernetes-1-28-jammy }}
|
|
skip: ${{ github.event.pull_request.draft }}
|
|
- name: kube-1-29
|
|
image: ${{ fromJSON(needs.image_manifest.outputs.manifest).kubernetes-1-29-jammy }}
|
|
skip: ${{ github.event.pull_request.draft }}
|
|
- name: kube-1-30
|
|
image: ${{ fromJSON(needs.image_manifest.outputs.manifest).kubernetes-1-30-jammy }}
|
|
skip: false
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
if: ${{ !matrix.skip }}
|
|
|
|
- name: Write cloud credential
|
|
run: >
|
|
echo "$CLOUD" > clouds.yml
|
|
shell: bash
|
|
env:
|
|
CLOUD: ${{ secrets.CLOUD }}
|
|
if: ${{ !matrix.skip }}
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
check-latest: true
|
|
if: ${{ !matrix.skip }}
|
|
|
|
- name: Install OpenStack CLI
|
|
run: pip install python-openstackclient
|
|
if: ${{ !matrix.skip }}
|
|
|
|
- name: Ensure Kubernetes image
|
|
id: ensure-image
|
|
uses: ./.github/actions/ensure-image
|
|
with:
|
|
image-name: ${{ matrix.image.name }}
|
|
image-url: ${{ matrix.image.url }}
|
|
if: ${{ !matrix.skip }}
|
|
|
|
- name: Write matrix outputs
|
|
uses: cloudposse/github-action-matrix-outputs-write@0.4.2
|
|
with:
|
|
matrix-step-name: ${{ github.job }}
|
|
matrix-key: ${{ matrix.name }}
|
|
outputs: |-
|
|
image-id: ${{ steps.ensure-image.outputs.image-id }}
|
|
kube-version: ${{ matrix.image.kubernetes_version }}
|
|
if: ${{ !matrix.skip }}
|
|
|
|
produce_outputs:
|
|
runs-on: ubuntu-latest
|
|
needs: [ensure_image]
|
|
outputs:
|
|
kube-1-28-image: ${{ fromJSON(steps.matrix-outputs.outputs.result).image-id.kube-1-28 }}
|
|
kube-1-28-version: ${{ fromJSON(steps.matrix-outputs.outputs.result).kube-version.kube-1-28 }}
|
|
kube-1-29-image: ${{ fromJSON(steps.matrix-outputs.outputs.result).image-id.kube-1-29 }}
|
|
kube-1-29-version: ${{ fromJSON(steps.matrix-outputs.outputs.result).kube-version.kube-1-29 }}
|
|
kube-1-30-image: ${{ fromJSON(steps.matrix-outputs.outputs.result).image-id.kube-1-30 }}
|
|
kube-1-30-version: ${{ fromJSON(steps.matrix-outputs.outputs.result).kube-version.kube-1-30 }}
|
|
steps:
|
|
- name: Read matrix outputs
|
|
id: matrix-outputs
|
|
uses: cloudposse/github-action-matrix-outputs-read@0.1.1
|
|
with:
|
|
matrix-step-name: ensure_image
|