From c8aae80dd79475ac34aacc0b47ed50845b238aa8 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 | 31 +++++++++++++++++++ .../jenkins/sriov-network-operator-ci.yaml | 2 +- 2 files changed, 32 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..5c14c08b20 --- /dev/null +++ b/.github/workflows/pr-ci-triggers.yml @@ -0,0 +1,31 @@ +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, + To run vendors CIs use one of: + * `/test-all`: To run all tests for all vendors. + * `/test-e2e-all`: To run all E2E tests for all vendors. + * `/test-e2e-nvidia-all`: To run all E2E tests for NVIDIA vendor. + + To skip the vendors CIs use one of: + * `/skip-all`: To skip all tests for all vendors. + * `/skip-e2e-all`: To skip all E2E tests for all vendors. + * `/skip-e2e-nvidia-all`: To skip all E2E tests for NVIDIA vendor. + Best regards. + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: $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: