From 246869b2d55943f3b24b58b3a796a69fd5c12156 Mon Sep 17 00:00:00 2001 From: yih Date: Wed, 21 Feb 2024 15:26:05 +0800 Subject: [PATCH] ci: split simplified test --- .github/workflows/cs8.yml | 342 ++++++++++++++++++++++++++++++-- .github/workflows/cs9.yml | 7 +- .github/workflows/fedora-39.yml | 7 +- .github/workflows/rhel-8.yml | 342 ++++++++++++++++++++++++++++++-- .github/workflows/rhel-9.yml | 263 ++++++++++++++++++++++-- 5 files changed, 905 insertions(+), 56 deletions(-) diff --git a/.github/workflows/cs8.yml b/.github/workflows/cs8.yml index 0b4a3ef..14ae973 100644 --- a/.github/workflows/cs8.yml +++ b/.github/workflows/cs8.yml @@ -1,18 +1,17 @@ name: RHEL for Edge test on CS8 on: - # Triggered by osbuild-composer CI from gitlab repository_dispatch: - types: [osbuild-composer-ci] + types: [trigger-workflow] jobs: pr-info: runs-on: ubuntu-latest steps: - - name: Get PR number from string PR-xxxx + - name: Get PR number from trigger event id: pr-num run: | - PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}" | cut -d'-' -f 2) + PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}") echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT - name: Get information for osbuild-composer pull request @@ -342,17 +341,17 @@ jobs: /tmp/artifacts/*.json /tmp/artifacts/*.log - pre-edge-simplified-cs8: + pre-edge-simplified-no-fdo-cs8: needs: pr-info runs-on: ubuntu-latest env: - STATUS_NAME: Tests / edge-simplified-cs8 + STATUS_NAME: Tests / edge-simplified-no-fdo-cs8 steps: - name: Get Current Job Log URL id: job-log-url run: | - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-cs8" '.jobs | map(select(.name == "pre-edge-simplified-cs8")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-no-fdo-cs8" '.jobs | map(select(.name == "pre-edge-simplified-no-fdo-cs8")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -368,19 +367,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT }} - edge-simplified-cs8: - needs: [pr-info, pre-edge-simplified-cs8] + edge-simplified-no-fdo-cs8: + needs: [pr-info, pre-edge-simplified-no-fdo-cs8] runs-on: [kite, x86_64, rhos-0x, centos-stream-8, large] timeout-minutes: 160 env: - STATUS_NAME: Tests / edge-simplified-cs8 + STATUS_NAME: Tests / edge-simplified-no-fdo-cs8 steps: - name: Get Current Job Log URL id: job-log-url run: | sudo dnf install -y jq - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-cs8" '.jobs | map(select(.name == "edge-simplified-cs8")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-no-fdo-cs8" '.jobs | map(select(.name == "edge-simplified-no-fdo-cs8")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -409,8 +408,8 @@ jobs: GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} timeout-minutes: 20 - - name: run ostree-simplified-installer.sh - run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer.sh + - name: run ostree-simplified-installer-no-fdo.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-no-fdo.sh env: EDGE_USER_PASSWORD: foobar timeout-minutes: 150 @@ -442,7 +441,322 @@ jobs: - uses: actions/upload-artifact@v3 if: ${{ always() }} with: - name: edge-simplified-cs8 + name: edge-simplified-no-fdo-cs8 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-insecure-cs8: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-insecure-cs8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-insecure-cs8" '.jobs | map(select(.name == "pre-edge-simplified-fdo-insecure-cs8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'CentOS Stream 8 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-insecure-cs8: + needs: [pr-info, pre-edge-simplified-fdo-insecure-cs8] + runs-on: [kite, x86_64, rhos-0x, centos-stream-8, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-insecure-cs8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-insecure-cs8" '.jobs | map(select(.name == "edge-simplified-fdo-insecure-cs8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'CentOS Stream 8 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-insecure.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-insecure.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'CentOS Stream 8 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'CentOS Stream 8 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-insecure-cs8 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-hashkey-cs8: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-hashkey-cs8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-hashkey-cs8" '.jobs | map(select(.name == "pre-edge-simplified-fdo-hashkey-cs8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'CentOS Stream 8 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-hashkey-cs8: + needs: [pr-info, pre-edge-simplified-fdo-hashkey-cs8] + runs-on: [kite, x86_64, rhos-0x, centos-stream-8, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-hashkey-cs8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-hashkey-cs8" '.jobs | map(select(.name == "edge-simplified-fdo-hashkey-cs8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'CentOS Stream 8 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-hashkey.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-hashkey.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'CentOS Stream 8 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'CentOS Stream 8 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-hashkey-cs8 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-rootcert-cs8: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-rootcert-cs8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-rootcert-cs8" '.jobs | map(select(.name == "pre-edge-simplified-fdo-rootcert-cs8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'CentOS Stream 8 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-rootcert-cs8: + needs: [pr-info, pre-edge-simplified-fdo-rootcert-cs8] + runs-on: [kite, x86_64, rhos-0x, centos-stream-8, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-rootcert-cs8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-rootcert-cs8" '.jobs | map(select(.name == "edge-simplified-fdo-rootcert-cs8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'CentOS Stream 8 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-rootcert.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-rootcert.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'CentOS Stream 8 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'CentOS Stream 8 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-rootcert-cs8 path: | /tmp/artifacts/*.json /tmp/artifacts/*.log diff --git a/.github/workflows/cs9.yml b/.github/workflows/cs9.yml index 2f83e4a..13b59c3 100644 --- a/.github/workflows/cs9.yml +++ b/.github/workflows/cs9.yml @@ -1,18 +1,17 @@ name: RHEL for Edge test on CS9 on: - # Triggered by osbuild-composer CI from gitlab repository_dispatch: - types: [osbuild-composer-ci] + types: [trigger-workflow] jobs: pr-info: runs-on: ubuntu-latest steps: - - name: Get PR number from string PR-xxxx + - name: Get PR number from trigger event id: pr-num run: | - PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}" | cut -d'-' -f 2) + PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}") echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT - name: Get information for osbuild-composer pull request diff --git a/.github/workflows/fedora-39.yml b/.github/workflows/fedora-39.yml index f44ec30..713563f 100644 --- a/.github/workflows/fedora-39.yml +++ b/.github/workflows/fedora-39.yml @@ -2,18 +2,17 @@ name: RHEL for Edge test on Fedora 39 on: - # Triggered by osbuild-composer CI from gitlab repository_dispatch: - types: [osbuild-composer-ci] + types: [trigger-workflow] jobs: pr-info: runs-on: ubuntu-latest steps: - - name: Get PR number from string PR-xxxx + - name: Get PR number from trigger event id: pr-num run: | - PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}" | cut -d'-' -f 2) + PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}") echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT - name: Get information for osbuild-composer pull request diff --git a/.github/workflows/rhel-8.yml b/.github/workflows/rhel-8.yml index 6d6b762..8197af5 100644 --- a/.github/workflows/rhel-8.yml +++ b/.github/workflows/rhel-8.yml @@ -2,18 +2,17 @@ name: RHEL for Edge test on RHEL 8 on: - # Triggered by osbuild-composer CI from gitlab repository_dispatch: - types: [osbuild-composer-ci] + types: [trigger-workflow] jobs: pr-info: runs-on: ubuntu-latest steps: - - name: Get PR number from string PR-xxxx + - name: Get PR number from trigger event id: pr-num run: | - PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}" | cut -d'-' -f 2) + PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}") echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT - name: Get information for osbuild-composer pull request @@ -343,17 +342,17 @@ jobs: /tmp/artifacts/*.json /tmp/artifacts/*.log - pre-edge-simplified-8: + pre-edge-simplified-no-fdo-8: needs: pr-info runs-on: ubuntu-latest env: - STATUS_NAME: Tests / edge-simplified-8 + STATUS_NAME: Tests / edge-simplified-no-fdo-8 steps: - name: Get Current Job Log URL id: job-log-url run: | - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-8" '.jobs | map(select(.name == "pre-edge-simplified-8")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-no-fdo-8" '.jobs | map(select(.name == "pre-edge-simplified-no-fdo-8")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -369,19 +368,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT }} - edge-simplified-8: - needs: [pr-info, pre-edge-simplified-8] + edge-simplified-no-fdo-8: + needs: [pr-info, pre-edge-simplified-no-fdo-8] runs-on: [kite, x86_64, rhos-0x, rhel-8-10, large] timeout-minutes: 160 env: - STATUS_NAME: Tests / edge-simplified-8 + STATUS_NAME: Tests / edge-simplified-no-fdo-8 steps: - name: Get Current Job Log URL id: job-log-url run: | sudo dnf install -y jq - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-8" '.jobs | map(select(.name == "edge-simplified-8")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-no-fdo-8" '.jobs | map(select(.name == "edge-simplified-no-fdo-8")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -410,8 +409,8 @@ jobs: GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} timeout-minutes: 20 - - name: run ostree-simplified-installer.sh - run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer.sh + - name: run ostree-simplified-installer-no-fdo.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-no-fdo.sh env: EDGE_USER_PASSWORD: foobar timeout-minutes: 150 @@ -443,7 +442,322 @@ jobs: - uses: actions/upload-artifact@v3 if: ${{ always() }} with: - name: edge-simplified-8 + name: edge-simplified-no-fdo-8 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-insecure-8: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-insecure-8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-insecure-8" '.jobs | map(select(.name == "pre-edge-simplified-fdo-insecure-8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 8.10 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-insecure-8: + needs: [pr-info, pre-edge-simplified-fdo-insecure-8] + runs-on: [kite, x86_64, rhos-0x, rhel-8-10, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-insecure-8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-insecure-8" '.jobs | map(select(.name == "edge-simplified-fdo-insecure-8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 8.10 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-insecure.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-insecure.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'RHEL 8.10 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'RHEL 8.10 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-insecure-8 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-hashkey-8: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-hashkey-8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-hashkey-8" '.jobs | map(select(.name == "pre-edge-simplified-fdo-hashkey-8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 8.10 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-hashkey-8: + needs: [pr-info, pre-edge-simplified-fdo-hashkey-8] + runs-on: [kite, x86_64, rhos-0x, rhel-8-10, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-hashkey-8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-hashkey-8" '.jobs | map(select(.name == "edge-simplified-fdo-hashkey-8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 8.10 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-hashkey.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-hashkey.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'RHEL 8.10 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'RHEL 8.10 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-hashkey-8 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-rootcert-8: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-rootcert-8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-rootcert-8" '.jobs | map(select(.name == "pre-edge-simplified-fdo-rootcert-8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 8.10 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-rootcert-8: + needs: [pr-info, pre-edge-simplified-fdo-rootcert-8] + runs-on: [kite, x86_64, rhos-0x, rhel-8-10, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-rootcert-8 + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-rootcert-8" '.jobs | map(select(.name == "edge-simplified-fdo-rootcert-8")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 8.10 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-rootcert.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-rootcert.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'RHEL 8.10 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'RHEL 8.10 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-rootcert-8 path: | /tmp/artifacts/*.json /tmp/artifacts/*.log diff --git a/.github/workflows/rhel-9.yml b/.github/workflows/rhel-9.yml index 5693664..ba6291c 100644 --- a/.github/workflows/rhel-9.yml +++ b/.github/workflows/rhel-9.yml @@ -28,6 +28,7 @@ jobs: sha: ${{ fromJson(steps.pr-api.outputs.data).head.sha }} sender_repo: ${{ fromJson(steps.pr-api.outputs.data).head.repo.full_name }} sender_branch: ${{ fromJson(steps.pr-api.outputs.data).head.ref }} + pr_number: ${{ steps.pr-num.outputs.pr_number }} pre-edge-commit-9: needs: pr-info @@ -557,17 +558,17 @@ jobs: /tmp/artifacts/*.json /tmp/artifacts/*.log - pre-edge-simplified-9: + pre-edge-simplified-no-fdo-9: needs: pr-info runs-on: ubuntu-latest env: - STATUS_NAME: Tests / edge-simplified-9 + STATUS_NAME: Tests / edge-simplified-no-fdo-9 steps: - name: Get Current Job Log URL id: job-log-url run: | - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-9" '.jobs | map(select(.name == "pre-edge-simplified-9")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-no-fdo-9" '.jobs | map(select(.name == "pre-edge-simplified-no-fdo-9")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -583,19 +584,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT }} - edge-simplified-9: - needs: [pr-info, pre-edge-simplified-9] + edge-simplified-no-fdo-9: + needs: [pr-info, pre-edge-simplified-no-fdo-9] runs-on: [kite, x86_64, rhos-0x, rhel-9-4, large] timeout-minutes: 160 env: - STATUS_NAME: Tests / edge-simplified-9 + STATUS_NAME: Tests / edge-simplified-no-fdo-9 steps: - name: Get Current Job Log URL id: job-log-url run: | sudo dnf install -y jq - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-9" '.jobs | map(select(.name == "edge-simplified-9")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-no-fdo-9" '.jobs | map(select(.name == "edge-simplified-no-fdo-9")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -624,8 +625,8 @@ jobs: GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} timeout-minutes: 20 - - name: run ostree-simplified-installer.sh - run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer.sh + - name: run ostree-simplified-installer-no-fdo.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-no-fdo.sh env: EDGE_USER_PASSWORD: foobar timeout-minutes: 150 @@ -657,22 +658,22 @@ jobs: - uses: actions/upload-artifact@v3 if: ${{ always() }} with: - name: edge-simplified-9 + name: edge-simplified-no-fdo-9 path: | /tmp/artifacts/*.json /tmp/artifacts/*.log - pre-edge-simplified-9-fips: + pre-edge-simplified-fdo-insecure-9: needs: pr-info runs-on: ubuntu-latest env: - STATUS_NAME: Tests / edge-simplified-9-fips + STATUS_NAME: Tests / edge-simplified-fdo-insecure-9 steps: - name: Get Current Job Log URL id: job-log-url run: | - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-9-fips" '.jobs | map(select(.name == "pre-edge-simplified-9-fips")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-insecure-9" '.jobs | map(select(.name == "pre-edge-simplified-fdo-insecure-9")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -688,19 +689,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT }} - edge-simplified-9-fips: - needs: [pr-info, pre-edge-simplified-9-fips] + edge-simplified-fdo-insecure-9: + needs: [pr-info, pre-edge-simplified-fdo-insecure-9] runs-on: [kite, x86_64, rhos-0x, rhel-9-4, large] timeout-minutes: 160 env: - STATUS_NAME: Tests / edge-simplified-9-fips + STATUS_NAME: Tests / edge-simplified-fdo-insecure-9 steps: - name: Get Current Job Log URL id: job-log-url run: | sudo dnf install -y jq - JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-9-fips" '.jobs | map(select(.name == "edge-simplified-9-fips")) | .[0].html_url') + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-insecure-9" '.jobs | map(select(.name == "edge-simplified-fdo-insecure-9")) | .[0].html_url') echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -729,8 +730,219 @@ jobs: GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} timeout-minutes: 20 - - name: run ostree-simplified-installer.sh - run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer.sh + - name: run ostree-simplified-installer-fdo-insecure.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-insecure.sh + env: + EDGE_USER_PASSWORD: foobar + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'RHEL 9.4 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'RHEL 9.4 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-insecure-9 + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-hashkey-9-fips: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-hashkey-9-fips + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-hashkey-9-fips" '.jobs | map(select(.name == "pre-edge-simplified-fdo-hashkey-9-fips")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 9.4 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-hashkey-9-fips: + needs: [pr-info, pre-edge-simplified-fdo-hashkey-9-fips] + runs-on: [kite, x86_64, rhos-0x, rhel-9-4, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-hashkey-9-fips + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-hashkey-9-fips" '.jobs | map(select(.name == "edge-simplified-fdo-hashkey-9-fips")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 9.4 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-hashkey.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-hashkey.sh + env: + EDGE_USER_PASSWORD: foobar + FIPS: true + timeout-minutes: 150 + + - name: Set non cancelled result status + if: ${{ !cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: ${{ job.status }} + description: 'RHEL 9.4 - Test got ${{ job.status }}' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Set cancelled result status + if: ${{ cancelled() }} + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: error + description: 'RHEL 9.4 - Test got error' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: edge-simplified-fdo-hashkey-9-fips + path: | + /tmp/artifacts/*.json + /tmp/artifacts/*.log + + pre-edge-simplified-fdo-rootcert-9-fips: + needs: pr-info + runs-on: ubuntu-latest + env: + STATUS_NAME: Tests / edge-simplified-fdo-rootcert-9-fips + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "pre-edge-simplified-fdo-rootcert-9-fips" '.jobs | map(select(.name == "pre-edge-simplified-fdo-rootcert-9-fips")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 9.4 - Runner has been deploying...' + target_url: '${{ steps.job-log-url.outputs.html_url }}' + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + edge-simplified-fdo-rootcert-9-fips: + needs: [pr-info, pre-edge-simplified-fdo-rootcert-9-fips] + runs-on: [kite, x86_64, rhos-0x, rhel-9-4, large] + timeout-minutes: 160 + env: + STATUS_NAME: Tests / edge-simplified-fdo-rootcert-9-fips + + steps: + - name: Get Current Job Log URL + id: job-log-url + run: | + sudo dnf install -y jq + JOB_HTML_URL=$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/osbuild/rhel-edge-ci/actions/runs/${GITHUB_RUN_ID}/jobs?per_page=30" | jq -r --arg job_name "edge-simplified-fdo-rootcert-9-fips" '.jobs | map(select(.name == "edge-simplified-fdo-rootcert-9-fips")) | .[0].html_url') + echo "html_url=$JOB_HTML_URL" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/osbuild/osbuild-composer/statuses/${{ needs.pr-info.outputs.sha }}' + context: ${{ env.STATUS_NAME }} + state: pending + description: 'RHEL 9.4 - Test has been running...' + target_url: ${{ steps.job-log-url.outputs.html_url }} + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + repository: ${{ needs.pr-info.outputs.sender_repo }} + ref: ${{ needs.pr-info.outputs.sender_branch }} + fetch-depth: 0 + + - name: Make a deployment + run: schutzbot/deploy.sh + env: + GIT_COMMIT: ${{ needs.pr-info.outputs.sha }} + timeout-minutes: 20 + + - name: run ostree-simplified-installer-fdo-rootcert.sh + run: /usr/libexec/tests/osbuild-composer/ostree-simplified-installer-fdo-rootcert.sh env: EDGE_USER_PASSWORD: foobar FIPS: true @@ -763,7 +975,7 @@ jobs: - uses: actions/upload-artifact@v3 if: ${{ always() }} with: - name: edge-simplified-9-fips + name: edge-simplified-fdo-rootcert-9-fips path: | /tmp/artifacts/*.json /tmp/artifacts/*.log @@ -1520,3 +1732,14 @@ jobs: path: | /tmp/artifacts/*.json /tmp/artifacts/*.log + + trigger-other-os-test: + if: ${{ always() }} + needs: [pr-info, edge-installer-9] + runs-on: ubuntu-latest + steps: + - name: trigger other os test + uses: peter-evans/repository-dispatch@v3 + with: + event-type: trigger-workflow + client-payload: '{"pr_number": "${{ needs.pr-info.outputs.pr_number }}"}'