diff --git a/.github/workflows/fedora-rawhide.yml b/.github/workflows/fedora-rawhide.yml index 48fcc32f9..dc4ce4166 100644 --- a/.github/workflows/fedora-rawhide.yml +++ b/.github/workflows/fedora-rawhide.yml @@ -9,12 +9,7 @@ on: jobs: pr-info: if: ${{ github.event.issue.pull_request && - (endsWith(github.event.comment.body, '/test-rawhide') || - endsWith(github.event.comment.body, '/test-rawhide-minimal') || - endsWith(github.event.comment.body, '/test-rawhide-arm-minimal') || - endsWith(github.event.comment.body, '/test-rawhide-virt') || - endsWith(github.event.comment.body, '/test-rawhide-ng') || - endsWith(github.event.comment.body, '/test-rawhide-raw')) }} + (endsWith(github.event.comment.body, '/test-rawhide')) }} runs-on: ubuntu-latest steps: - name: Query author repository permissions @@ -25,8 +20,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # restrict running of tests to users with admin or write permission for the repository - # see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-permissions-for-a-user - name: Check if user does have correct permissions if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission) id: check_user_perm @@ -44,405 +37,61 @@ jobs: 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}} - pre-iot-commit-rawhide: + iot-rawhide-x86: needs: pr-info - if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && - (endsWith(github.event.comment.body, '/test-rawhide') || - endsWith(github.event.comment.body, '/test-rawhide-virt')) }} + if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request }} + continue-on-error: true runs-on: ubuntu-latest - env: - STATUS_NAME: iot-commit-rawhide steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Runner has been deploying...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - iot-commit-rawhide: - needs: [pr-info, pre-iot-commit-rawhide] - runs-on: [kite, x86_64, gcp, fedora-rawhide, medium] - env: - STATUS_NAME: iot-commit-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Test has been running...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Clone repository - uses: actions/checkout@v3 - with: - ref: ${{ needs.pr-info.outputs.sha }} - fetch-depth: 0 - - - name: run ostree.sh - run: ./ostree.sh - timeout-minutes: 60 - - - name: Set non cancelled result status - if: ${{ !cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: ${{ job.status }} - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set cancelled result status - if: ${{ cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: error - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/upload-artifact@v3 - with: - name: iot-commit-rawhide - path: | - *.json - *.log - - pre-iot-installer-rawhide: - needs: pr-info - if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && - (endsWith(github.event.comment.body, '/test-rawhide') || - endsWith(github.event.comment.body, '/test-rawhide-ng')) }} - runs-on: ubuntu-latest - env: - STATUS_NAME: iot-installer-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Runner has been deploying...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - iot-installer-rawhide: - needs: [pr-info, pre-iot-installer-rawhide] - runs-on: [kite, x86_64, rhos-01, fedora-rawhide, large] - env: - STATUS_NAME: iot-installer-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Test has been running...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Clone repository - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: ${{ needs.pr-info.outputs.sha }} fetch-depth: 0 - - name: run ostree-ng.sh - run: ./ostree-ng.sh - env: - OCP4_TOKEN: ${{ secrets.OCP4_TOKEN }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - timeout-minutes: 120 - - - name: Set non cancelled result status - if: ${{ !cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: ${{ job.status }} - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set cancelled result status - if: ${{ cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: error - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/upload-artifact@v3 - with: - name: iot-installer-rawhide - path: | - *.json - *.log - - pre-iot-raw-image-rawhide: + - name: Run the tests + uses: sclorg/testing-farm-as-github-action@v2 + with: + compose: Fedora-Rawhide-Nightly + api_key: ${{ secrets.TF_API_KEY }} + git_url: ${{ needs.pr-info.outputs.repo_url }} + git_ref: ${{ needs.pr-info.outputs.ref }} + update_pull_request_status: true + pull_request_status_name: "iot-rawhide-x86" + tmt_context: "arch=x86_64;distro=fedora" + tmt_plan_regex: edge-x86 + tf_scope: private + secrets: "DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }};DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};GOVC_URL=${{ secrets.GOVC_URL }};GOVC_USERNAME=${{ secrets.GOVC_USERNAME }};GOVC_PASSWORD=${{ secrets.GOVC_PASSWORD }}" + variables: "ARCH=x86_64;AWS_DEFAULT_REGION=us-east-1;GOVC_INSECURE=1" + + iot-rawhide-arm: needs: pr-info - if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && - (endsWith(github.event.comment.body, '/test-rawhide') || - endsWith(github.event.comment.body, '/test-rawhide-raw')) }} + if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request }} + continue-on-error: true runs-on: ubuntu-latest - env: - STATUS_NAME: iot-raw-image-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Runner has been deploying...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - iot-raw-image-rawhide: - needs: [pr-info, pre-iot-raw-image-rawhide] - runs-on: [kite, x86_64, gcp, fedora-rawhide, medium] - env: - STATUS_NAME: iot-raw-image-rawhide steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Test has been running...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Clone repository - uses: actions/checkout@v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: ${{ needs.pr-info.outputs.sha }} fetch-depth: 0 - - name: run ostree-raw-image.sh - run: ./ostree-raw-image.sh - env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - timeout-minutes: 90 - - - name: Set non cancelled result status - if: ${{ !cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: ${{ job.status }} - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set cancelled result status - if: ${{ cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: error - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/upload-artifact@v3 - if: ${{ always() }} - with: - name: iot-raw-image-rawhide - path: | - *.json - *.log - - pre-minimal-raw-rawhide: - needs: pr-info - if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && - (endsWith(github.event.comment.body, '/test-rawhide') || - endsWith(github.event.comment.body, '/test-rawhide-minimal')) }} - runs-on: ubuntu-latest - env: - STATUS_NAME: minimal-raw-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Runner has been deploying...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - minimal-raw-rawhide: - needs: [pr-info, pre-minimal-raw-rawhide] - runs-on: [kite, x86_64, gcp, fedora-rawhide, medium] - env: - STATUS_NAME: minimal-raw-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Test has been running...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Clone repository - uses: actions/checkout@v3 - with: - ref: ${{ needs.pr-info.outputs.sha }} - fetch-depth: 0 - - - name: run minimal-raw.sh - run: ./minimal-raw.sh - env: - DOWNLOAD_NODE: ${{ secrets.DOWNLOAD_NODE }} - timeout-minutes: 60 - - - name: Set non cancelled result status - if: ${{ !cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: ${{ job.status }} - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set cancelled result status - if: ${{ cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: error - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/upload-artifact@v3 - with: - name: minimal-raw-rawhide - path: | - *.json - *.log - - pre-arm-minimal-rawhide: - needs: pr-info - if: ${{ needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && - (endsWith(github.event.comment.body, '/test-rawhide') || - endsWith(github.event.comment.body, '/test-rawhide-arm-minimal')) }} - runs-on: ubuntu-latest - env: - STATUS_NAME: arm-minimal-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Runner has been deploying...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - arm-minimal-rawhide: - needs: [pr-info, pre-arm-minimal-rawhide] - runs-on: [kite, aarch64, beaker, fedora-rawhide] - env: - STATUS_NAME: arm-minimal-rawhide - - steps: - - name: Create in-progress status - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: pending - description: 'Test has been running...' - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Clone repository - uses: actions/checkout@v3 - with: - ref: ${{ needs.pr-info.outputs.sha }} - fetch-depth: 0 - - - name: run minimal-raw.sh - run: ./minimal-raw.sh - env: - DOWNLOAD_NODE: ${{ secrets.DOWNLOAD_NODE }} - timeout-minutes: 60 - - - name: Set non cancelled result status - if: ${{ !cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: ${{ job.status }} - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Set cancelled result status - if: ${{ cancelled() }} - uses: octokit/request-action@v2.x - with: - route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' - context: ${{ env.STATUS_NAME }} - state: error - target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/upload-artifact@v3 - with: - name: arm-minimal-rawhide - path: | - *.json - *.log + - name: Run the tests + uses: sclorg/testing-farm-as-github-action@v2 + with: + compose: Fedora-Rawhide-Nightly + api_key: ${{ secrets.TF_API_KEY }} + git_url: ${{ needs.pr-info.outputs.repo_url }} + git_ref: ${{ needs.pr-info.outputs.ref }} + update_pull_request_status: true + pull_request_status_name: "iot-rawhide-arm" + tmt_context: "arch=aarch64;distro=fedora" + tmt_plan_regex: edge-arm + tf_scope: private + secrets: "DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }};DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};GOVC_URL=${{ secrets.GOVC_URL }};GOVC_USERNAME=${{ secrets.GOVC_USERNAME }};GOVC_PASSWORD=${{ secrets.GOVC_PASSWORD }}" + variables: "ARCH=aarch64;AWS_DEFAULT_REGION=us-east-1;GOVC_INSECURE=1" diff --git a/.github/workflows/trigger-fedora.yml b/.github/workflows/trigger-fedora.yml index 28cf193d7..151fcb571 100644 --- a/.github/workflows/trigger-fedora.yml +++ b/.github/workflows/trigger-fedora.yml @@ -15,118 +15,118 @@ env: UPDATES_URL_F39: https://dl.fedoraproject.org/pub/fedora/linux/updates/39 jobs: -#Disable Fedora Rawhide F41 jobs until osbuild-composer supports it -# check-compose: -# # Do not run this job on any fork repos -# if: github.repository == 'virt-s1/rhel-edge' -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# -# - name: Check if fedora rawhide compose is new -# id: check_compose_id -# run: | -# curl -s "${COMPOSE_URL_rawhide}/COMPOSE_ID" --output COMPOSE_ID -# COMPOSE_ID=$(cat COMPOSE_ID) -# TESTED_COMPOSE=( $( cat compose/compose.fedora ) ) -# if [[ " ${TESTED_COMPOSE[*]} " =~ "$COMPOSE_ID" ]]; then -# COMPOSE_ID="false" -# fi -# -# if [[ "$COMPOSE_ID" != "false" ]]; then -# gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST -# PR_LIST=$(cat PR_LIST) -# if [[ $PR_LIST == *"$COMPOSE_ID"* ]]; then -# echo "pr_running=true" >> $GITHUB_OUTPUT -# else -# echo "pr_running=false" >> $GITHUB_OUTPUT -# fi -# -# OSBUILD_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><") -# OSBUILD_COMPOSER_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><") -# COMPOSER_CLI_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/w/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><") -# echo "osbuild_version=$OSBUILD_VERSION" >> $GITHUB_OUTPUT -# echo "osbuild_composer_version=$OSBUILD_COMPOSER_VERSION" >> $GITHUB_OUTPUT -# echo "composer_cli_version=$COMPOSER_CLI_VERSION" >> $GITHUB_OUTPUT -# -# else -# echo "osbuild_version=Null" >> $GITHUB_OUTPUT -# echo "osbuild_composer_version=Null" >> $GITHUB_OUTPUT -# echo "composer_cli_version=Null" >> $GITHUB_OUTPUT -# fi -# -# echo "rawhide_compose=$COMPOSE_ID" >> $GITHUB_OUTPUT -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# -# outputs: -# rawhide_compose: ${{ steps.check_compose_id.outputs.rawhide_compose }} -# osbuild_version: ${{ steps.check_compose_id.outputs.osbuild_version }} -# osbuild_composer_version: ${{ steps.check_compose_id.outputs.osbuild_composer_version }} -# composer_cli_version: ${{ steps.check_compose_id.outputs.composer_cli_version }} -# pr_running: ${{ steps.check_compose_id.outputs.pr_running }} -# -# fedora-rawhide: -# needs: check-compose -# if: ${{ needs.check-compose.outputs.rawhide_compose != 'false' && needs.check-compose.outputs.pr_running == 'false' }} -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# -# - name: Add new compose id in compose.fedora -# run: | -# compose_id="${{ needs.check-compose.outputs.rawhide_compose }}" -# echo $compose_id >> compose/compose.fedora -# cat compose/compose.fedora -# -# - name: Get current date -# id: date -# run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT -# -# - name: Create Pull Request -# id: cpr -# uses: peter-evans/create-pull-request@v4 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# commit-message: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}" -# committer: cloudkitebot -# author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> -# branch: cpr -# branch-suffix: random -# delete-branch: true -# title: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}" -# labels: auto-merge,fedora-rawhide -# body: | -# Fedora rawhide compose ${{ needs.check-compose.outputs.rawhide_compose }} -# - Date: ${{ steps.date.outputs.date }} -# - Compose URL: ${{ env.COMPOSE_URL_rawhide }} -# - Packages: -# - ${{ needs.check-compose.outputs.osbuild_version }} -# - ${{ needs.check-compose.outputs.osbuild_composer_version }} -# - ${{ needs.check-compose.outputs.composer_cli_version }} -# -# - name: Enable Pull Request Automerge -# if: steps.cpr.outputs.pull-request-operation == 'created' -# uses: peter-evans/enable-pull-request-automerge@v2 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} -# merge-method: rebase -# -# - name: Add a comment to trigger test workflow -# uses: peter-evans/create-or-update-comment@v2 -# with: -# token: ${{ secrets.PAT }} -# issue-number: ${{ steps.cpr.outputs.pull-request-number }} -# body: /test-rawhide -# -# - name: Create a project card to track compose test result -# uses: peter-evans/create-or-update-project-card@v2 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# project-name: Fedora Compose Test -# column-name: Fedora-rawhide -# issue-number: ${{ steps.cpr.outputs.pull-request-number }} + + check-compose: + # Do not run this job on any fork repos + if: github.repository == 'virt-s1/rhel-edge' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Check if fedora rawhide compose is new + id: check_compose_id + run: | + curl -s "${COMPOSE_URL_rawhide}/COMPOSE_ID" --output COMPOSE_ID + COMPOSE_ID=$(cat COMPOSE_ID) + TESTED_COMPOSE=( $( cat compose/compose.fedora ) ) + if [[ " ${TESTED_COMPOSE[*]} " =~ "$COMPOSE_ID" ]]; then + COMPOSE_ID="false" + fi + + if [[ "$COMPOSE_ID" != "false" ]]; then + gh pr list -R virt-s1/rhel-edge --state open --json title --jq '.[].title' > PR_LIST + PR_LIST=$(cat PR_LIST) + if [[ $PR_LIST == *"$COMPOSE_ID"* ]]; then + echo "pr_running=true" >> $GITHUB_OUTPUT + else + echo "pr_running=false" >> $GITHUB_OUTPUT + fi + + OSBUILD_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-[0-9].*<" | tr -d "><") + OSBUILD_COMPOSER_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/o/" | grep -ioE ">osbuild-composer-[0-9].*<" | tr -d "><") + COMPOSER_CLI_VERSION=$(curl -s "${COMPOSE_URL_rawhide}/Everything/x86_64/os/Packages/w/" | grep -ioE ">weldr-client-[0-9].*<" | tr -d "><") + echo "osbuild_version=$OSBUILD_VERSION" >> $GITHUB_OUTPUT + echo "osbuild_composer_version=$OSBUILD_COMPOSER_VERSION" >> $GITHUB_OUTPUT + echo "composer_cli_version=$COMPOSER_CLI_VERSION" >> $GITHUB_OUTPUT + + else + echo "osbuild_version=Null" >> $GITHUB_OUTPUT + echo "osbuild_composer_version=Null" >> $GITHUB_OUTPUT + echo "composer_cli_version=Null" >> $GITHUB_OUTPUT + fi + + echo "rawhide_compose=$COMPOSE_ID" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + outputs: + rawhide_compose: ${{ steps.check_compose_id.outputs.rawhide_compose }} + osbuild_version: ${{ steps.check_compose_id.outputs.osbuild_version }} + osbuild_composer_version: ${{ steps.check_compose_id.outputs.osbuild_composer_version }} + composer_cli_version: ${{ steps.check_compose_id.outputs.composer_cli_version }} + pr_running: ${{ steps.check_compose_id.outputs.pr_running }} + + fedora-rawhide: + needs: check-compose + if: ${{ needs.check-compose.outputs.rawhide_compose != 'false' && needs.check-compose.outputs.pr_running == 'false' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Add new compose id in compose.fedora + run: | + compose_id="${{ needs.check-compose.outputs.rawhide_compose }}" + echo $compose_id >> compose/compose.fedora + cat compose/compose.fedora + + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}" + committer: cloudkitebot + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + branch: cpr + branch-suffix: random + delete-branch: true + title: "${{ needs.check-compose.outputs.rawhide_compose }} - ${{ steps.date.outputs.date }}" + labels: auto-merge,fedora-rawhide + body: | + Fedora rawhide compose ${{ needs.check-compose.outputs.rawhide_compose }} + - Date: ${{ steps.date.outputs.date }} + - Compose URL: ${{ env.COMPOSE_URL_rawhide }} + - Packages: + - ${{ needs.check-compose.outputs.osbuild_version }} + - ${{ needs.check-compose.outputs.osbuild_composer_version }} + - ${{ needs.check-compose.outputs.composer_cli_version }} + + - name: Enable Pull Request Automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: rebase + + - name: Add a comment to trigger test workflow + uses: peter-evans/create-or-update-comment@v2 + with: + token: ${{ secrets.PAT }} + issue-number: ${{ steps.cpr.outputs.pull-request-number }} + body: /test-rawhide + + - name: Create a project card to track compose test result + uses: peter-evans/create-or-update-project-card@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + project-name: Fedora Compose Test + column-name: Fedora-rawhide + issue-number: ${{ steps.cpr.outputs.pull-request-number }} fedora-40: # Do not need check-compose and make "workflow_dispatch" work for this job diff --git a/arm-commit.sh b/arm-commit.sh index cec831869..1269291d2 100755 --- a/arm-commit.sh +++ b/arm-commit.sh @@ -169,6 +169,18 @@ case "$TEST_OS" in BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/aarch64/os/" SYSROOT_RO="true" ;; + "fedora-41") + IMAGE_TYPE="iot-commit" + cp tools/user-data "$CLOUD_INIT_DIR" + OS_VARIANT="fedora-rawhide" + OSTREE_REF="fedora/41/${ARCH}/iot" + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + USER_IN_COMMIT="false" + EMBEDDED_CONTAINER="false" + BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/aarch64/os/" + SYSROOT_RO="true" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/arm-ignition.sh b/arm-ignition.sh index 77348a495..e1e6def11 100755 --- a/arm-ignition.sh +++ b/arm-ignition.sh @@ -169,6 +169,17 @@ case "$TEST_OS" in ANSIBLE_OS_NAME="fedora-iot" REF_PREFIX="fedora-iot" ;; + "fedora-41") + OS_VARIANT="fedora-unknown" + cp tools/user-data "$CLOUD_INIT_DIR" + OSTREE_REF="fedora/41/${ARCH}/iot" + CONTAINER_IMAGE_TYPE=iot-container + SIMPLIFIED_IMAGE_TYPE=iot-simplified-installer + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + ANSIBLE_OS_NAME="fedora-iot" + REF_PREFIX="fedora-iot" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/arm-installer.sh b/arm-installer.sh index bb5cac2a2..066a2687b 100755 --- a/arm-installer.sh +++ b/arm-installer.sh @@ -245,6 +245,20 @@ case "$TEST_OS" in ANSIBLE_OS_NAME="fedora" SYSROOT_RO="true" ;; + "fedora-41") + OS_VARIANT="fedora-rawhide" + cp tools/user-data "$CLOUD_INIT_DIR" + OSTREE_REF="fedora/41/${ARCH}/iot" + CONTAINER_IMAGE_TYPE=iot-container + INSTALLER_IMAGE_TYPE=iot-installer + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + EMBEDDED_CONTAINER="false" + CONTAINER_PUSHING_FEAT="false" + QUAY_REPO="" + ANSIBLE_OS_NAME="fedora" + SYSROOT_RO="true" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/arm-minimal.sh b/arm-minimal.sh index f2e148af2..f93e3a004 100755 --- a/arm-minimal.sh +++ b/arm-minimal.sh @@ -137,6 +137,12 @@ case "$TEST_OS" in GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/aarch64/images" GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') ;; + "fedora-41") + OS_VARIANT="fedora-rawhide" + cp tools/user-data "$CLOUD_INIT_DIR" + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/arm-raw.sh b/arm-raw.sh index 45f9417ba..c9256a320 100755 --- a/arm-raw.sh +++ b/arm-raw.sh @@ -181,6 +181,18 @@ case "$TEST_OS" in REF_PREFIX="fedora-iot" SYSROOT_RO="true" ;; + "fedora-41") + OS_VARIANT="fedora-rawhide" + cp tools/user-data "$CLOUD_INIT_DIR" + OSTREE_REF="fedora/41/${ARCH}/iot" + CONTAINER_IMAGE_TYPE=iot-container + RAW_IMAGE_TYPE=iot-raw-image + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + ANSIBLE_OS_NAME="fedora-iot" + REF_PREFIX="fedora-iot" + SYSROOT_RO="true" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/arm-rebase.sh b/arm-rebase.sh index 644275e17..f55165669 100755 --- a/arm-rebase.sh +++ b/arm-rebase.sh @@ -159,6 +159,17 @@ case "$TEST_OS" in BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/aarch64/os/" SYSROOT_RO="true" ;; + "fedora-41") + IMAGE_TYPE="iot-commit" + cp tools/user-data "$CLOUD_INIT_DIR" + OS_VARIANT="fedora-rawhide" + OSTREE_REF="fedora/41/${ARCH}/iot" + OSTREE_REBASE_REF="fedora/xx/${ARCH}/iot" + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/aarch64/os/" + SYSROOT_RO="true" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/arm-simplified.sh b/arm-simplified.sh index 265f1816e..36eef4b09 100755 --- a/arm-simplified.sh +++ b/arm-simplified.sh @@ -193,6 +193,18 @@ case "$TEST_OS" in REF_PREFIX="fedora-iot" SYSROOT_RO="true" ;; + "fedora-41") + OS_VARIANT="fedora-rawhide" + cp tools/user-data "$CLOUD_INIT_DIR" + OSTREE_REF="fedora/41/${ARCH}/iot" + CONTAINER_IMAGE_TYPE=iot-container + SIMPLIFIED_IMAGE_TYPE=iot-simplified-installer + GUEST_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/aarch64/images" + GUEST_IMAGE_NAME=$(curl -s "${GUEST_IMAGE_URL}/" | grep -ioE ">Fedora-Cloud-Base-Generic\.aarch64.*.qcow2<" | tr -d '><') + ANSIBLE_OS_NAME="fedora-iot" + REF_PREFIX="fedora-iot" + SYSROOT_RO="true" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/minimal-raw.sh b/minimal-raw.sh index 2babd4c69..4a39992e9 100755 --- a/minimal-raw.sh +++ b/minimal-raw.sh @@ -64,6 +64,11 @@ case "${ID}-${VERSION_ID}" in MINIMAL_RAW_DECOMPRESSED=disk.raw MINIMAL_RAW_FILENAME=disk.raw.xz ;; + "fedora-41") + OS_VARIANT="fedora-rawhide" + MINIMAL_RAW_DECOMPRESSED=disk.raw + MINIMAL_RAW_FILENAME=disk.raw.xz + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;; diff --git a/ostree-ng.sh b/ostree-ng.sh index 4dc06c8e1..4f23d0317 100755 --- a/ostree-ng.sh +++ b/ostree-ng.sh @@ -135,6 +135,15 @@ case "${ID}-${VERSION_ID}" in CONTAINER_IMAGE_TYPE=fedora-iot-container INSTALLER_IMAGE_TYPE=fedora-iot-installer OSTREE_REF="fedora-iot/40/${ARCH}/iot" + OS_VARIANT="fedora-unknown" + ANSIBLE_OS_NAME="fedora-iot" + SYSROOT_RO="true" + DIRS_FILES_CUSTOMIZATION="true" + ;; + "fedora-41") + CONTAINER_IMAGE_TYPE=fedora-iot-container + INSTALLER_IMAGE_TYPE=fedora-iot-installer + OSTREE_REF="fedora-iot/41/${ARCH}/iot" OS_VARIANT="fedora-rawhide" ANSIBLE_OS_NAME="fedora-iot" SYSROOT_RO="true" diff --git a/ostree-raw-image.sh b/ostree-raw-image.sh index 69f3b0a70..698181dec 100755 --- a/ostree-raw-image.sh +++ b/ostree-raw-image.sh @@ -118,6 +118,17 @@ case "${ID}-${VERSION_ID}" in CONTAINER_TYPE=fedora-iot-container RAW_TYPE=iot-raw-image OSTREE_REF="fedora/40/${ARCH}/iot" + OS_VARIANT="fedora-unknown" + ADD_SSSD="false" + ANSIBLE_OS_NAME="fedora-iot" + USER_IN_RAW="true" + REF_PREFIX="fedora-iot" + SYSROOT_RO="true" + ;; + "fedora-41") + CONTAINER_TYPE=fedora-iot-container + RAW_TYPE=iot-raw-image + OSTREE_REF="fedora/41/${ARCH}/iot" OS_VARIANT="fedora-rawhide" ADD_SSSD="false" ANSIBLE_OS_NAME="fedora-iot" diff --git a/ostree.sh b/ostree.sh index 6bee779ad..11dc29d1b 100755 --- a/ostree.sh +++ b/ostree.sh @@ -128,17 +128,17 @@ case "${ID}-${VERSION_ID}" in SYSROOT_RO="true" DIRS_FILES_CUSTOMIZATION="true" ;; -# "fedora-41") -# IMAGE_TYPE=fedora-iot-commit -# USER_IN_COMMIT="false" -# OSTREE_REF="fedora/41/${ARCH}/iot" -# OS_VARIANT="fedora-rawhide" -# BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/" -# CUT_DIRS=8 -# ADD_SSSD="false" -# SYSROOT_RO="true" -# DIRS_FILES_CUSTOMIZATION="true" -# ;; + "fedora-41") + IMAGE_TYPE=fedora-iot-commit + USER_IN_COMMIT="false" + OSTREE_REF="fedora/41/${ARCH}/iot" + OS_VARIANT="fedora-rawhide" + BOOT_LOCATION="https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/" + CUT_DIRS=8 + ADD_SSSD="false" + SYSROOT_RO="true" + DIRS_FILES_CUSTOMIZATION="true" + ;; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;;