Skip to content

Commit

Permalink
Merge pull request #181 from yih-redhat/add-rawhide
Browse files Browse the repository at this point in the history
ci: add support for fedora rawhide
  • Loading branch information
yih-redhat authored Nov 20, 2024
2 parents 7032b3b + e8c0944 commit b69bede
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 9 deletions.
51 changes: 42 additions & 9 deletions .github/workflows/greenboot-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
name: Greenboot Test
name: CI Test

on:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
fedora-41-bootc-qcow2:
continue-on-error: true
check-pull-request:
runs-on: ubuntu-latest

steps:
- name: Query author repository permissions
uses: octokit/[email protected]
Expand All @@ -34,19 +32,54 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }}
sha: ${{ fromJson(steps.pr-api.outputs.data).head.sha }}
ref: ${{ fromJson(steps.pr-api.outputs.data).head.ref }}
repo_url: ${{ fromJson(steps.pr-api.outputs.data).head.repo.html_url }}

Fedora-41-bootc:
needs: check-pull-request
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
continue-on-error: true
runs-on: ubuntu-latest

steps:
- name: Run the tests
if: ${{ steps.check_user_perm.outputs.allowed_user == 'true' }}
uses: sclorg/[email protected]
with:
compose: Fedora-41
api_key: ${{ secrets.TF_API_KEY }}
git_url: ${{ fromJson(steps.pr-api.outputs.data).head.repo.html_url }}
git_ref: ${{ fromJson(steps.pr-api.outputs.data).head.ref }}
update_pull_request_status: true
pull_request_status_name: "f41-bootc"
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
git_ref: ${{ needs.check-pull-request.outputs.ref }}
# update_pull_request_status: true
# pull_request_status_name: "Fedora-41-bootc"
tmt_context: "arch=x86_64;distro=fedora-41"
tmt_plan_regex: bootc
tf_scope: private
secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }}"
variables: "ARCH=x86_64"
timeout: 90

Fedora-rawhide-bootc:
needs: check-pull-request
if: ${{ needs.check-pull-request.outputs.allowed_user == 'true' }}
continue-on-error: true
runs-on: ubuntu-latest

steps:
- name: Run the tests
uses: sclorg/[email protected]
with:
compose: Fedora-Rawhide
api_key: ${{ secrets.TF_API_KEY }}
git_url: ${{ needs.check-pull-request.outputs.repo_url }}
git_ref: ${{ needs.check-pull-request.outputs.ref }}
# update_pull_request_status: true
# pull_request_status_name: "Fedora-Rawhide-bootc"
tmt_context: "arch=x86_64;distro=fedora-rawhide"
tmt_plan_regex: bootc
tf_scope: private
secrets: "QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};STAGE_REDHAT_IO_USERNAME=${{ secrets.STAGE_REDHAT_IO_USERNAME }};STAGE_REDHAT_IO_TOKEN=${{ secrets.STAGE_REDHAT_IO_TOKEN }}"
variables: "ARCH=x86_64"
timeout: 90
5 changes: 5 additions & 0 deletions tests/greenboot-bootc-anaconda-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ case "${ID}-${VERSION_ID}" in
BASE_IMAGE_URL="quay.io/fedora/fedora-bootc:41"
BIB_URL="quay.io/centos-bootc/bootc-image-builder:latest"
;;
"fedora-rawhide")
OS_VARIANT="fedora-unknown"
BASE_IMAGE_URL="quay.io/fedora/fedora-bootc:rawhide"
BIB_URL="quay.io/centos-bootc/bootc-image-builder:latest"
;;
"centos-9")
OS_VARIANT="centos-stream9"
BASE_IMAGE_URL="quay.io/centos-bootc/centos-bootc:stream9"
Expand Down
5 changes: 5 additions & 0 deletions tests/greenboot-bootc-qcow2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ case "${ID}-${VERSION_ID}" in
BASE_IMAGE_URL="quay.io/fedora/fedora-bootc:41"
BIB_URL="quay.io/centos-bootc/bootc-image-builder:latest"
;;
"fedora-rawhide")
OS_VARIANT="fedora-unknown"
BASE_IMAGE_URL="quay.io/fedora/fedora-bootc:rawhide"
BIB_URL="quay.io/centos-bootc/bootc-image-builder:latest"
;;
"centos-9")
OS_VARIANT="centos-stream9"
BASE_IMAGE_URL="quay.io/centos-bootc/centos-bootc:stream9"
Expand Down

0 comments on commit b69bede

Please sign in to comment.