Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: issue_comment triggers refactoring #17419

Merged
merged 5 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/maintainers-little-helper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ flake-tracker:
- ci/flake
jenkins-config:
jenkins-url: https://jenkins.cilium.io
regex-trigger: (^test-me-please)
regex-trigger: (^/?test(-me-please)?)
pchaigno marked this conversation as resolved.
Show resolved Hide resolved
stable-jobs:
- cilium-master-gke
- cilium-master-k8s-1.16-kernel-net-next
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/conformance-aks-v1.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-aks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-aks-1.10') ||
startsWith(github.event.comment.body, '/ci-aks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -72,7 +74,9 @@ jobs:
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-aks-1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10'))
startsWith(github.event.comment.body, '/ci-aks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -105,14 +109,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-aks-1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, '/ci-aks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test-backport-1.10') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/conformance-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-aks') ||
startsWith(github.event.comment.body, 'test-me-please')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-aks') && !startsWith(github.event.comment.body, 'ci-aks-') ||
startsWith(github.event.comment.body, '/ci-aks') && !startsWith(github.event.comment.body, '/ci-aks-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -74,8 +76,10 @@ jobs:
name: Deduce required tests from code changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-aks') ||
(startsWith(github.event.comment.body, 'test-me-please'))
startsWith(github.event.comment.body, 'ci-aks') && !startsWith(github.event.comment.body, 'ci-aks-') ||
startsWith(github.event.comment.body, '/ci-aks') && !startsWith(github.event.comment.body, '/ci-aks-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -108,14 +112,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-aks') ||
(startsWith(github.event.comment.body, 'test-me-please') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, 'ci-aks') && !startsWith(github.event.comment.body, 'ci-aks-') ||
startsWith(github.event.comment.body, '/ci-aks') && !startsWith(github.event.comment.body, '/ci-aks-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/conformance-aws-cni-v1.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-awscni-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-awscni-1.10') ||
startsWith(github.event.comment.body, '/ci-awscni-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -72,7 +74,9 @@ jobs:
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-awscni-1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10'))
startsWith(github.event.comment.body, '/ci-awscni-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -105,14 +109,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-awscni-1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, '/ci-awscni-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test-backport-1.10') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/conformance-aws-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-awscni') ||
startsWith(github.event.comment.body, 'test-me-please')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-awscni') && !startsWith(github.event.comment.body, 'ci-awscni-') ||
startsWith(github.event.comment.body, '/ci-awscni') && !startsWith(github.event.comment.body, '/ci-awscni-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -74,8 +76,10 @@ jobs:
name: Deduce required tests from code changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-awscni') ||
(startsWith(github.event.comment.body, 'test-me-please'))
startsWith(github.event.comment.body, 'ci-awscni') && !startsWith(github.event.comment.body, 'ci-awscni-') ||
startsWith(github.event.comment.body, '/ci-awscni') && !startsWith(github.event.comment.body, '/ci-awscni-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -108,14 +112,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-awscni') ||
(startsWith(github.event.comment.body, 'test-me-please') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, 'ci-awscni') && !startsWith(github.event.comment.body, 'ci-awscni-') ||
startsWith(github.event.comment.body, '/ci-awscni') && !startsWith(github.event.comment.body, '/ci-awscni-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/conformance-eks-v1.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-eks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-eks-1.10') ||
startsWith(github.event.comment.body, '/ci-eks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -72,7 +74,9 @@ jobs:
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-eks-1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10'))
startsWith(github.event.comment.body, '/ci-eks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -105,14 +109,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-eks-1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, '/ci-eks-1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test-backport-1.10') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/conformance-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-eks') ||
startsWith(github.event.comment.body, 'test-me-please')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-eks') && !startsWith(github.event.comment.body, 'ci-eks-') ||
startsWith(github.event.comment.body, '/ci-eks') && !startsWith(github.event.comment.body, '/ci-eks-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -74,8 +76,10 @@ jobs:
name: Deduce required tests from code changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-eks') ||
(startsWith(github.event.comment.body, 'test-me-please'))
startsWith(github.event.comment.body, 'ci-eks') && !startsWith(github.event.comment.body, 'ci-eks-') ||
startsWith(github.event.comment.body, '/ci-eks') && !startsWith(github.event.comment.body, '/ci-eks-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -108,14 +112,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-eks') ||
(startsWith(github.event.comment.body, 'test-me-please') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, 'ci-eks') && !startsWith(github.event.comment.body, 'ci-eks-') ||
startsWith(github.event.comment.body, '/ci-eks') && !startsWith(github.event.comment.body, '/ci-eks-') ||
startsWith(github.event.comment.body, 'test-me-please') && !startsWith(github.event.comment.body, 'test-me-please-') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test') && !startsWith(github.event.comment.body, '/test-') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/conformance-externalworkloads-v1.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ concurrency:
${{ github.event_name }}
${{
(github.event_name == 'schedule' && github.sha) ||
(github.event_name == 'issue_comment' &&
(startsWith(github.event.comment.body, 'ci-external-workloads-v1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10')) &&
github.event.issue.number) ||
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-external-workloads-v1.10') ||
startsWith(github.event.comment.body, '/ci-external-workloads-v1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
) && github.event.issue.number) ||
(github.event_name == 'pull_request' && github.event.pull_request.number)
}}
cancel-in-progress: true
Expand All @@ -74,7 +76,9 @@ jobs:
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-external-workloads-v1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10'))
startsWith(github.event.comment.body, '/ci-external-workloads-v1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') ||
startsWith(github.event.comment.body, '/test-backport-1.10')
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down Expand Up @@ -107,14 +111,16 @@ jobs:
src:
- '!(test|Documentation)/**'

# When the test-me-please trigger is used, this job is skipped if the only
# modified files were under test/ or Documentation/.
# This job is skipped when the workflow was triggered with the generic `/test`
# trigger if the only modified files were under `test/` or `Documentation/`.
installation-and-connectivity:
needs: check_changes
if: |
(github.event_name == 'issue_comment' && (
startsWith(github.event.comment.body, 'ci-external-workloads-v1.10') ||
(startsWith(github.event.comment.body, 'test-backport-1.10') && (needs.check_changes.outputs.tested == 'true'))
startsWith(github.event.comment.body, '/ci-external-workloads-v1.10') ||
startsWith(github.event.comment.body, 'test-backport-1.10') && needs.check_changes.outputs.tested == 'true' ||
startsWith(github.event.comment.body, '/test-backport-1.10') && needs.check_changes.outputs.tested == 'true'
)) ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event_name == 'pull_request'
Expand Down