reporting status back to Github, before using `input`

23 wyświetlenia
Przejdź do pierwszej nieodczytanej wiadomości

j.kn...@travelaudience.com

nieprzeczytany,
6 kwi 2018, 08:00:576.04.2018
do Jenkins Users
I think I have a request for something that is not possible, but I thought I'd ask anyhow. 

Here's the current scenario:
We're using Github multibranch/organization so that every branch in every repo that has a Jenkinsfile gets built with CI. When the build completes, Jenkins reports the status back to Github (and for Pull Requests, we can block the merge back into master if the build fails).

What we want to achieve:
After Jenkins successfully builds a branch/repo (meaning after all the current steps are complete), we want to provide an option for the user to select to deploy and then continue the execution of the Jenkinsfile. But Github is left in a state of "Some checks haven’t completed yet". But the use-case we want is to instead consider the job done in Github, and not block the merge into master. For example, if the deployment is not a desired next step.

We considered an alternative of having a non-blocking job that runs after the build is complete (to manage the deployment), but this removes the ability to have the deployment steps specific for the branch/repo. In other words, the branch/repo should be responsible for defining how it gets deployed (what pre/post install steps it needs), not a generic job for every branch/repo (that has to have a groovy/declarative process that is capable of all possible pre/post steps). 

So... is there anyway to send the status back to Github during Jenkinsfile execution?

j.kn...@travelaudience.com

nieprzeczytany,
6 kwi 2018, 08:53:266.04.2018
do Jenkins Users
I think I answered my own question in finding a plugin to do this: https://plugins.jenkins.io/pipeline-githubnotify-step

Steven Foster

nieprzeczytany,
6 kwi 2018, 09:20:456.04.2018
do Jenkins Users
If you end up managing your own status notifications, you might want to either use the same "context"/"label" as the automatic multibranch notifications (so it is overwritten) or disable the automatic ones and manage it entirely yourself.

https://plugins.jenkins.io/github-scm-trait-notification-context here is a plugin that lets you customize the context that multibranch uses for its automatic status updates
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0