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

CI: avoid duplicate runs for secondary branches on main repo #5394

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

EZoni
Copy link
Member

@EZoni EZoni commented Oct 15, 2024

The fix introduced in #5308 was not correct for Azure pipelines.

In GitHub Actions we trigger a run on the push event only for the development branch.

The Azure equivalent of that is triggering a run on the trigger event only for the development branch. However, since the trigger event was completely absent from the Azure pipeline file (that is, the default setup was being used), I had erroneously added the filter branch to the pr event instead, unlike what I did for GitHub actions where the push was exposed in the YAML files.

This was originally aimed at avoiding duplicate runs for "individual CI" when pre-commit opens a pull request by pushing to a secondary branch pre-commit-ci-update-config in the main repo (instead of a fork).

The new setup is tested in #5393, where I copied these changes and where one can see that a commit pushed to that PR does not trigger an "individual CI" Azure pipeline anymore, but only a "PR automated" one.

Hopefully this is correct for the merge commits that get pushed to development once a PR is closed, but we'll be able to test this only after merging a PR.

@EZoni EZoni self-assigned this Oct 15, 2024
@EZoni EZoni merged commit 3f730b3 into ECP-WarpX:development Oct 15, 2024
37 checks passed
@EZoni EZoni deleted the ci_fix_azure_branch_filter branch October 15, 2024 15:54
@EZoni
Copy link
Member Author

EZoni commented Oct 15, 2024

Before this PR, after a push to, e.g., #5393:
Screenshot from 2024-10-15 08-57-51

After this PR, after a push to, e.g., #5393:
Screenshot from 2024-10-15 08-58-11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tests Tests and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants