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

Build: Don't auto-trigger CI on release PRs #23198

Merged
merged 5 commits into from
Jun 23, 2023
Merged

Conversation

JReinhold
Copy link
Contributor

What I did

We don't want to trigger CI on any updates to release PRs because they update frequently and it's a waste to run CI before we actually are ready for the release process.

Now the Releaser have to manually add the ci:daily label to trigger CI on changes.

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@JReinhold JReinhold self-assigned this Jun 23, 2023
@JReinhold JReinhold added patch:yes Bugfix & documentation PR that need to be picked to main branch build Internal-facing build tooling & test updates labels Jun 23, 2023
Comment on lines -12 to -13
- version-prerelease-from-**
- version-patch-from-**
Copy link
Contributor Author

@JReinhold JReinhold Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this as it should already be covered by "pull_request_target" > "synchronize", and removing these makes sure the "merged" workflow doesn't trigger unnecessarily.

@@ -56,7 +54,7 @@ jobs:
trigger-pr-tests:
runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && ((github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ci:pr')) && !contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily'))
if: github.event_name == 'pull_request_target' && (((github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'release')) || contains(github.event.pull_request.labels.*.name, 'ci:pr')) && !contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily'))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trigger PR tests if:

  1. is "pull_request_target" event
  2. AND
    1. (not draft
    2. AND not "release")
    3. OR has "ci:pr" label
  3. AND don't have "ci:merged"
  4. AND don't have "ci:daily"

Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JReinhold JReinhold merged commit 1d61076 into next Jun 23, 2023
@JReinhold JReinhold deleted the release-tooling-simpler-ci branch June 23, 2023 14:44
JReinhold added a commit that referenced this pull request Jun 23, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 23, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 24, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 26, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 26, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 26, 2023
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
@JReinhold JReinhold added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants