How to relaunch GitHub check without pushing new commits?

JenkinsGithubTriggersPull Request

Jenkins Problem Overview


I'm currently using GitHub with a basic Jenkins integration (with the GitHub plugin): each time I push something, my Jenkins tests are triggered and the status is reported to GitHub.

For some dirty reasons (and I know the root cause is here), my tests could randomly fail and then report a failed status to GitHub (which blocked the possibility to merge the PR: and that's the expected behavior).

Do you know if it's possible to relaunch the tests without pushing a new commit? Because I know if I relaunch the tests, they will pass.

Jenkins Solutions


Solution 1 - Jenkins

Update: you can also push an empty commit to your branch to re-trigger status checks: git commit -m "retrigger checks" --allow-empty and then git push <branchname>

You can do this by closing and then re-opening the Pull Request. This will cause all status checks to run again on the same commit.

Solution 2 - Jenkins

Doing git commit --amend and force pushing makes github retrigger all checks. Not perfect but better than closing then reopening the PR.

Solution 3 - Jenkins

There's now a button in the Github UI to rerun checks. Not sure if it works for Jenkins, but it worked for my situation.

enter image description here

Solution 4 - Jenkins

If you open a PR that failed, under Checks tab you will see the list of all checks that were performed on your PR. Next to the failed ones, there will be a clickable text that says "Re-run"

enter image description here

Solution 5 - Jenkins

Depending on how you have integrated Github with Jenkins and what plugin you have have used, the method might vary. But usually you have support for "magic"-sentences that will retrigger Jenkins if added as a comment on Github.

For example commenting "test this please" or "retest this please" in Github might retrigger Jenkins.

Solution 6 - Jenkins

Seems like closing and re-opening the PR could be an option.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLabynocleView Question on Stackoverflow
Solution 1 - JenkinsAdil BView Answer on Stackoverflow
Solution 2 - JenkinsGeorgi SabevView Answer on Stackoverflow
Solution 3 - JenkinsDharmaTurtleView Answer on Stackoverflow
Solution 4 - JenkinsIgorView Answer on Stackoverflow
Solution 5 - JenkinsClearedView Answer on Stackoverflow
Solution 6 - JenkinsMichał HepnerView Answer on Stackoverflow