From 628c3c5a5b7b6b5455f9ce07a0a78238bc1d3f0d Mon Sep 17 00:00:00 2001 From: abdallahyas Date: Thu, 2 Dec 2021 11:48:09 +0000 Subject: [PATCH] Add pr-ci-triggers workflow Added the pr-ci-triggers github workflow to print out available vendors CIs trigger phrases. --- .github/workflows/pr-ci-triggers.yml | 32 +++++++++++++++++++ .../jenkins/sriov-network-operator-ci.yaml | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr-ci-triggers.yml diff --git a/.github/workflows/pr-ci-triggers.yml b/.github/workflows/pr-ci-triggers.yml new file mode 100644 index 0000000000..16dd9925c9 --- /dev/null +++ b/.github/workflows/pr-ci-triggers.yml @@ -0,0 +1,32 @@ +on: + pull_request_target: + +jobs: + vendors-ci-triggers-list: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + env: + MESSAGE: >- + Thanks for your PR,\n + To run vendors CIs use one of:\n + * `/test-all`: To run all tests for all vendors.\n + * `/test-e2e-all`: To run all E2E tests for all vendors.\n + * `/test-e2e-nvidia-all`: To run all E2E tests for NVIDIA vendor.\n + \n + To skip the vendors CIs use one of:\n + * `/skip-all`: To skip all tests for all vendors.\n + * `/skip-e2e-all`: To skip all E2E tests for all vendors.\n + * `/skip-e2e-nvidia-all`: To skip all E2E tests for NVIDIA vendor.\n + Best regards. + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + console.log("${{ env.MESSAGE }}") + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "${{ env.MESSAGE }}" + }) + diff --git a/ci/examples/jenkins/sriov-network-operator-ci.yaml b/ci/examples/jenkins/sriov-network-operator-ci.yaml index 2f4d58c6ec..28365db4dc 100644 --- a/ci/examples/jenkins/sriov-network-operator-ci.yaml +++ b/ci/examples/jenkins/sriov-network-operator-ci.yaml @@ -59,7 +59,7 @@ failure-status: "Build Failed, comment `/test-e2e-all`, /test-e2e-nvidia-all, or `/test-all` to retrigger" error-status: "Build Failed, comment `/test-e2e-all`, /test-e2e-nvidia-all, or `/test-all` to retrigger" status-context: '{project} CI' - trigger-phrase: ".*/test-(all|e2e-all|e2e-nvidia-all(,| |$)).*" + trigger-phrase: "^(?!Thanks for your PR).*/test-(all|e2e-all|e2e-nvidia-all(,| |$)).*" white-list: - '*' white-list-target-branches: