-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
[FAB-17133] Add Action to Trigger CI Builds #313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but is it possible to actually just re-run failed jobs?
So it's not using the AZ CLI, but I had my moment of clarity when I stepped away last night and got some sleep, it looks like the rest API has an endpoint for retriggering just the failed builds, I am working on that now |
Just curious - why is a github action comment for retriggering failed jobs better/different than clicking Re-Run on the failed job? |
This change adds a GitHub Action that is used to trigger CI builds when the PR is commented on using "/ci-run" Signed-off-by: Brett Logan <Brett.T.Logan@ibm.com>
The only people authorized to use the re-run function or the /azp-run comment are repo maintainers/admins and people who have been added to the org in Azure DevOps (which is unfortunate). So the maintainers and admins can retrigger individual failed jobs, but there is no mechanism for an author who isn't a maintainer to retrigger ci on their own build. @mastersingh24 I really dug into the the REST API today, there is no endpoint to re-trigger failed jobs only. Per above, as a maintainer you can do so via the checks tab, but the author cannot if they aren't a maintainer. I did open a ticket with Azure DevOp's to ask if and when this might be implemented and a feature request to add this. Unfortunately it's not perfect, but it's what we can do right now. Since author's can't re-trigger their CI on their own, this would give them some means to do so, even if not perfect. They only added rerun failed jobs last month, so its a fairly new feature, which is probably why there is nothing on the API for it. |
I updated the job to only allow the author or those assigned as reviewers (which in our case is our maintainers) to allow the retriggering of the pipeline. It also doesn't retrigger if a build is already executing against it |
Noted. Thanks for digging into it. This LGTM. |
This change adds a GitHub Action that is used
to trigger CI builds when the PR is commented
on using "/ci-run"
You can test it out here: https://github.com/btl5037/fabric/pull/3
You can see the actual runs here: https://github.com/btl5037/fabric/actions
Signed-off-by: Brett Logan Brett.T.Logan@ibm.com
Type of change
Description
This change adds a GitHub action to trigger CI builds on comment
Users can comment "/ci-run" on their PR conversation tab to retrigger CI. It first checks to see if an existing build is running before triggering the new build.