From e8c094424f9389df857eb6af90faa09d3e11f823 Mon Sep 17 00:00:00 2001 From: Yi He Date: Wed, 20 Nov 2024 20:56:45 +0800 Subject: [PATCH] ci: add support for fedora rawhide --- .github/workflows/greenboot-ci.yaml | 51 ++++++++++++++++++++++----- tests/greenboot-bootc-anaconda-iso.sh | 5 +++ tests/greenboot-bootc-qcow2.sh | 5 +++ 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/.github/workflows/greenboot-ci.yaml b/.github/workflows/greenboot-ci.yaml index 02b7fe6..de1ef89 100644 --- a/.github/workflows/greenboot-ci.yaml +++ b/.github/workflows/greenboot-ci.yaml @@ -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/request-action@v2.x @@ -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/testing-farm-as-github-action@v3.1.2 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/testing-farm-as-github-action@v3.1.2 + 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 diff --git a/tests/greenboot-bootc-anaconda-iso.sh b/tests/greenboot-bootc-anaconda-iso.sh index db870cb..e703a36 100755 --- a/tests/greenboot-bootc-anaconda-iso.sh +++ b/tests/greenboot-bootc-anaconda-iso.sh @@ -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" diff --git a/tests/greenboot-bootc-qcow2.sh b/tests/greenboot-bootc-qcow2.sh index 073859e..0390a0a 100755 --- a/tests/greenboot-bootc-qcow2.sh +++ b/tests/greenboot-bootc-qcow2.sh @@ -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"