Skip to content

Weekly images update #7

Weekly images update

Weekly images update #7

Workflow file for this run

name: Weekly images update
on:
workflow_dispatch:
schedule:
- cron: '30 2 * * 0'
jobs:
update-image:
name: ${{ matrix.group }}
runs-on: [self-hosted, spread-enabled]
strategy:
fail-fast: false
matrix:
include:
- group: ubuntu-14.04-64
source: ubuntu-14.04-64
target: ubuntu-14.04-64
cloud: google
- group: ubuntu-16.04-64
source: ubuntu-16.04-64
target: ubuntu-16.04-64
cloud: google
- group: ubuntu-18.04-64
source: ubuntu-18.04-64
target: ubuntu-18.04-64
cloud: google
- group: ubuntu-20.04-64
source: ubuntu-20.04-64-base
target: ubuntu-20.04-64
cloud: google
- group: ubuntu-22.04-64
source: ubuntu-22.04-64-base
target: ubuntu-22.04-64
cloud: google
- group: ubuntu-24.04-64
source: ubuntu-24.04-64-base
target: ubuntu-24.04-64
cloud: google
- group: ubuntu-24.10-64
source: ubuntu-24.10-64-base
target: ubuntu-24.10-64
cloud: google
- group: debian-11-64
source: debian-11-64-base
target: debian-11-64
cloud: google
- group: debian-12-64
source: debian-12-64-base
target: debian-12-64
cloud: google
- group: debian-sid-64
source: debian-sid-64-base
target: debian-sid-64
cloud: google
steps:
- name: Ensure the workspace is clean
run: |
rm -rf "${{ github.workspace }}"
mkdir "${{ github.workspace }}"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: master
- name: Run test
env:
IMAGE_BAKER_SA: ${{ secrets.IMAGE_BAKER_SA }}
run: |
if [ ${{ matrix.cloud }} == google ]; then
echo "$IMAGE_BAKER_SA" > sa.json
if ! spread "${{ matrix.cloud }}:${{ matrix.source }}:tasks/${{ matrix.cloud }}/update-image/${{ matrix.group }}"; then
echo "Spread images task failed, exiting..."
exit 1
fi
spread "${{ matrix.cloud }}:${{ matrix.target }}:tasks/${{ matrix.cloud }}/common/clean-old-images"
elif [ ${{ matrix.cloud }} == openstack ]; then
echo "Openstack updates not supported yet, exiting..."
exit 1
else
echo "${{ matrix.cloud }} updates not supported, exiting..."
exit 1
fi
- name: Discard spread workers
if: always()
run: |
shopt -s nullglob;
for r in .spread-reuse.*.yaml; do
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')";
done
- name: Cleanup job workspace after run tests
if: always()
run: |
rm -rf "${{ github.workspace }}"
mkdir "${{ github.workspace }}"