From edbb197de7dd657202d7c6d35264498df24c1fa5 Mon Sep 17 00:00:00 2001 From: Yi He Date: Tue, 6 Aug 2024 22:27:40 +0800 Subject: [PATCH] test new tfaga --- .github/workflows/rhel-95.yml | 11 ++++++--- .github/workflows/single.yml | 30 +++++++++++++++++++----- .github/workflows/test.yml | 43 ----------------------------------- 3 files changed, 32 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/rhel-95.yml b/.github/workflows/rhel-95.yml index ff519d2..85667ce 100644 --- a/.github/workflows/rhel-95.yml +++ b/.github/workflows/rhel-95.yml @@ -1,9 +1,9 @@ --- name: RHEL for Edge test on RHEL 9 -# on: -# repository_dispatch: -# types: [osbuild-composer-ci] +on: + repository_dispatch: + types: [osbuild-composer-ci] jobs: pr-info: @@ -27,6 +27,7 @@ jobs: 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 }} + pr_number: ${{ steps.pr-num.outputs.pr_number }} edge-rhel-95: needs: pr-info @@ -42,6 +43,10 @@ jobs: git_url: ${{ needs.pr-info.outputs.repo_url }} git_ref: ${{ needs.pr-info.outputs.ref }} github_token: ${{ secrets.PAT }} + repo_owner: osbuild + repo_name: osbuild-composer + pr_number: ${{ needs.pr-info.outputs.pr_number }} + commit_sha: ${{ needs.pr-info.outputs.sha }} update_pull_request_status: true tmt_context: "arch=x86_64;distro=rhel-9-5" pull_request_status_name: "edge-rhel-9.5-x86" diff --git a/.github/workflows/single.yml b/.github/workflows/single.yml index 80331d6..7293b6e 100644 --- a/.github/workflows/single.yml +++ b/.github/workflows/single.yml @@ -1,9 +1,9 @@ --- name: RHEL for Edge test on RHEL 9 -on: - repository_dispatch: - types: [osbuild-composer-ci] +# on: +# repository_dispatch: +# types: [osbuild-composer-ci] jobs: pr-info: @@ -27,6 +27,21 @@ jobs: 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 }} + pr_number: ${{ steps.pr-num.outputs.pr_number }} + + check-outputs: + needs: pr-info + runs-on: ubuntu-latest + + steps: + - name: check outputs + id: check-output + run: | + echo "sha is: ${{ needs.pr-info.outputs.sha }}" + echo "ref is: ${{ needs.pr-info.outputs.ref }}" + echo "repo_url is: ${{ needs.pr-info.outputs.repo_url }}" + echo "sender_repo is: ${{ needs.pr-info.outputs.sender_repo }}" + echo "pr_number is: ${{ needs.pr-info.outputs.pr_number }}" edge-rhel-95: needs: pr-info @@ -34,7 +49,7 @@ jobs: steps: - name: Run the tests - uses: sclorg/testing-farm-as-github-action@main + uses: jamacku/testing-farm-as-github-action@support-nonpr-context with: compose: RHEL-9.5.0-Nightly arch: x86_64 @@ -42,11 +57,14 @@ jobs: git_url: ${{ needs.pr-info.outputs.repo_url }} git_ref: ${{ needs.pr-info.outputs.ref }} github_token: ${{ secrets.PAT }} + repo_owner: osbuild + repo_name: osbuild-composer + pr_number: ${{ needs.pr-info.outputs.pr_number }} + commit_sha: ${{ needs.pr-info.outputs.sha }} update_pull_request_status: true tmt_context: "arch=x86_64;distro=rhel-9-5" pull_request_status_name: "edge-rhel-9.5-x86" - tmt_plan_regex: edge-x86-simplified-installer + tmt_plan_regex: edge-x86-commit tf_scope: private secrets: "DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }};V2_QUAY_USERNAME=${{ secrets.V2_QUAY_USERNAME }};V2_QUAY_PASSWORD=${{ secrets.V2_QUAY_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;CI=true;EDGE_USER_PASSWORD=foobar;GIT_COMMIT=${{ needs.pr-info.outputs.sha }}" - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 63c076b..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: Check PR information - -# on: -# repository_dispatch: -# types: [osbuild-composer-ci] - -jobs: - pr-info: - runs-on: ubuntu-latest - steps: - - name: Get PR number from string PR-xxxx - id: pr-num - run: | - PR_NUM=$(echo "${{ github.event.client_payload.pr_number }}" | cut -d'-' -f 2) - echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT - - - name: Get information for osbuild-composer pull request - uses: octokit/request-action@v2.x - id: pr-api - with: - route: GET /repos/osbuild/osbuild-composer/pulls/${{ steps.pr-num.outputs.pr_number }} - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - - outputs: - 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 }} - sender_repo: ${{ fromJson(steps.pr-api.outputs.data).head.repo.full_name }} - - check-outputs: - needs: pr-info - runs-on: ubuntu-latest - - steps: - - name: check outputs - id: check-output - run: | - echo "sha is: ${{ needs.pr-info.outputs.sha }}" - echo "ref is: ${{ needs.pr-info.outputs.ref }}" - echo "repo_url is: ${{ needs.pr-info.outputs.repo_url }}" - echo "sender_repo is: ${{ needs.pr-info.outputs.sender_repo }}"