Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3cf6509
test: add Schutzfile and update-schutzfile-images script
thozza May 6, 2026
e9d3ed2
test: add setup.sh for CI environment preparation
thozza May 6, 2026
6bfd38b
test: add get-container.sh to build container images
thozza May 6, 2026
0b5b73f
test: add build.sh to create disk images from containers
thozza May 6, 2026
5d17759
test: add boot.sh to boot and validate disk images
thozza May 6, 2026
b053e54
schutzbot: add scripts and files needed for CI setup
thozza May 6, 2026
b3bc7ea
test/generate_ci.py: add Containerfile COPY directive parser
thozza May 6, 2026
1e3ceb8
test/generate_ci.py: add CI job generator
thozza May 6, 2026
56ea6a5
test/generate_ci.py: add main entry point
thozza May 6, 2026
896d3bb
test/generate_ci.py: support per-containerfile runner override
thozza May 11, 2026
daac667
test/generate_ci.py: support subscribing test runners
thozza May 6, 2026
fdf67d7
test/generate_ci.py: support Red Hat registry login for CI runners
thozza May 11, 2026
a5673a8
test: add boot test config matrix
thozza May 6, 2026
ac3d1d1
ci: add generated .gitlab-ci.yml for boot tests
thozza May 6, 2026
93a9950
ci: add staleness check for generated .gitlab-ci.yml
thozza May 6, 2026
3830972
ci: add weekly images library ref update workflow
thozza May 6, 2026
693233b
test: add Makefile targets for tests and CI generation
thozza May 6, 2026
c34e361
stream10-installer: use local container storage for bootc source
thozza May 12, 2026
55f002f
stream10-installer: add fuse-overlayfs for overlay-on-overlay support
thozza May 14, 2026
e63cb31
rhel-10-installer: fix container ref in kickstart commands
thozza May 12, 2026
a50763c
gitignore: add Python bytecode patterns
thozza May 14, 2026
1963a06
XXX: cross-test against images fork
thozza May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/check-ci-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check CI config

on:
pull_request:
branches: [main]

jobs:
check-ci-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: pip install pyyaml

- name: Regenerate .gitlab-ci.yml
run: python3 test/generate_ci.py > .gitlab-ci.yml.generated

- name: Check .gitlab-ci.yml is up to date
run: diff -u .gitlab-ci.yml .gitlab-ci.yml.generated
43 changes: 43 additions & 0 deletions .github/workflows/update-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update images library ref

on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 0"

jobs:
update-and-push:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.SCHUTZBOT_GITHUB_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SCHUTZBOT_GITHUB_ACCESS_TOKEN }}
steps:
- name: Clone
run: |
git clone --depth=1 --branch main https://github.com/$GITHUB_REPOSITORY ./src

- name: User config
working-directory: ./src
run: |
git config user.name "schutzbot"
git config user.email "schutzbot@gmail.com"

- name: Update Schutzfile
working-directory: ./src
run: python3 test/update-schutzfile-images

- name: Open PR
working-directory: ./src
run: |
if git diff --exit-code; then echo "No changes"; exit 0; fi
branch="schutzfile-images-$(date -I)"
git checkout -b "${branch}"
git add Schutzfile
git commit -m "schutzfile: Update images library commit ref"
remote="https://oauth2:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}"
git push -f "${remote}" "${branch}"
gh pr create \
--title "Update images library commit ref" \
--body-file "github_pr_body.txt" \
--base "main" \
--head "${branch}"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
/*.local.sh
/*.local.yaml
github_pr_body.txt
_images/
build/
*.pyc
__pycache__/
294 changes: 291 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,296 @@
---
stages:
- init
- test
- finish

no-op:
init:
stage: init
interruptible: true
tags:
- shell
script:
- schutzbot/update_github_status.sh start

finish:
stage: finish
tags:
- shell
script:
- schutzbot/update_github_status.sh finish

fail:
stage: finish
tags:
- shell
script:
- schutzbot/update_github_status.sh fail
- exit 1
when: on_failure

.base:
interruptible: true
variables:
PYTHONUNBUFFERED: '1'
before_script:
- cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
- test/setup.sh
after_script:
- schutzbot/unregister.sh || true

.terraform:
extends: .base
tags:
- terraform

.terraform/openstack:
extends: .base
tags:
- terraform/openstack

stream9-qcow2-x86_64:
stage: test
extends: .terraform/openstack
variables:
RUNNER: rhos-01/fedora-43-x86_64
rules:
- changes:
- Schutzfile
- qcow2-amd64/**/*
- stream9-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh stream9-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 x86_64 centos-9
- test/boot.sh

stream9-qcow2-aarch64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-aarch64
rules:
- changes:
- Schutzfile
- qcow2-arm64/**/*
- stream9-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh stream9-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 aarch64 centos-9
- test/boot.sh

stream10-qcow2-x86_64:
stage: test
extends: .terraform/openstack
variables:
RUNNER: rhos-01/fedora-43-x86_64
rules:
- changes:
- Schutzfile
- qcow2-amd64/**/*
- stream10-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh stream10-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 x86_64 centos-10
- test/boot.sh

stream10-qcow2-aarch64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-aarch64
rules:
- changes:
- Schutzfile
- qcow2-arm64/**/*
- stream10-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh stream10-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 aarch64 centos-10
- test/boot.sh

stream10-installer-x86_64:
stage: test
extends: .terraform/openstack
variables:
RUNNER: rhos-01/fedora-43-x86_64-large
rules:
- changes:
- Schutzfile
- qcow2-amd64/**/*
- stream10-installer
- stream10-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh stream10-installer)
- PAYLOAD_REF=$(test/get-container.sh stream10-qcow2)
- test/build.sh "$CONTAINER_REF" bootc-generic-iso x86_64 centos-10 "$PAYLOAD_REF"
- test/boot.sh

rhel-10-azure-x86_64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-x86_64
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- azure-amd64/**/*
- azure/**/*
- rhel-10-azure
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-azure)
- test/build.sh "$CONTAINER_REF" vhd x86_64 rhel-10
- test/boot.sh

rhel-10-ec2-x86_64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-x86_64
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- ec2-amd64/**/*
- ec2/**/*
- rhel-10-ec2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-ec2)
- test/build.sh "$CONTAINER_REF" ami x86_64 rhel-10
- test/boot.sh

rhel-10-ec2-aarch64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-aarch64
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- ec2-arm64/**/*
- ec2/**/*
- rhel-10-ec2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-ec2)
- test/build.sh "$CONTAINER_REF" ami aarch64 rhel-10
- test/boot.sh

rhel-10-gcp-x86_64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-x86_64
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- gcp-amd64/**/*
- gcp/**/*
- rhel-10-gcp
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-gcp)
- test/build.sh "$CONTAINER_REF" gce x86_64 rhel-10
- test/boot.sh

rhel-10-installer-x86_64:
stage: test
extends: .terraform/openstack
variables:
RUNNER: rhos-01/fedora-43-x86_64-large
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- qcow2-amd64/**/*
- rhel-10-installer
- rhel-10-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-installer)
- PAYLOAD_REF=$(test/get-container.sh rhel-10-qcow2)
- test/build.sh "$CONTAINER_REF" bootc-generic-iso x86_64 rhel-10 "$PAYLOAD_REF"
- test/boot.sh

rhel-10-qcow2-x86_64:
stage: test
extends: .terraform/openstack
variables:
RUNNER: rhos-01/fedora-43-x86_64
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- qcow2-amd64/**/*
- rhel-10-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 x86_64 rhel-10
- test/boot.sh

rhel-10-qcow2-aarch64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-aarch64
SUBSCRIPTION_NEEDED: true
RH_REGISTRY_LOGIN_NEEDED: true
rules:
- changes:
- Schutzfile
- qcow2-arm64/**/*
- rhel-10-qcow2
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh rhel-10-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 aarch64 rhel-10
- test/boot.sh

hummingbird-qcow2-x86_64:
stage: test
extends: .terraform/openstack
variables:
RUNNER: rhos-01/fedora-43-x86_64
rules:
- changes:
- Schutzfile
- hummingbird-qcow2
- hummingbird-qcow2-amd64/**/*
- qcow2-amd64/**/*
- test/**/*
script:
- CONTAINER_REF=$(test/get-container.sh hummingbird-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 x86_64 hummingbird
- test/boot.sh

hummingbird-qcow2-aarch64:
stage: test
extends: .terraform
variables:
RUNNER: aws/fedora-43-aarch64
rules:
- changes:
- Schutzfile
- hummingbird-qcow2
- hummingbird-qcow2-arm64/**/*
- qcow2-arm64/**/*
- test/**/*
script:
- echo "no-op"
- CONTAINER_REF=$(test/get-container.sh hummingbird-qcow2)
- test/build.sh "$CONTAINER_REF" qcow2 aarch64 hummingbird
- test/boot.sh
3 changes: 3 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ ignore: |

rules:
document-start: disable
indentation:
spaces: 2
indent-sequences: consistent
line-length:
max: 200
truthy: disable
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ fmt: fmt-shell
.PHONY: fmt-shell
fmt-shell:
find . -name '*.sh' -not -path '*/.git/*' -exec shfmt -w -i 4 {} \;

.PHONY: test
test:
python3 -m pytest test/ -v

.PHONY: generate-ci
generate-ci:
python3 test/generate_ci.py > .gitlab-ci.yml
Loading
Loading