New answers tagged

0

Use the Bitbucket Branch Source plugin, which is an official plugin developed by the Jenkins developers. This plugin automatically creates jobs for all branches and pull requests of all repos in a project, and if you use Bitbucket Cloud it will also set up webhooks in Bitbucket to ensure pushes and PR updates automatically trigger builds in Jenkins.


0

As far as I can tell, there is no way to tweak arbitrary git config settings from within Jenkins. You would have to tweak your git config on your build agents. If you're using permanent agents, this would involve logging in as the jenkins user and running git config --global .... If you're using docker build agents, then you would need to bake the git ...


1

Is there an 'UpstreamCause' equivalent to the example for 'UserIdCause' that would allow me to specify which upstream cause should trigger a specific stage? Unfortunately, not in native Declarative syntax. As you can see from the source code, UserIdCause is special-cased, but no other cause is: static boolean shouldRunBeAllowed(Cause causeClass, String ...


0

I used the Groovy script console to obtain it this way: def executables = Jenkins.instance.computers.collect {c -> c.executors}. def runs = Jenkins.instance.computers.collect {c -> c.executors}. flatten(). findAll { executor -> executor.isBusy() }. collect { executor -> executor.getCurrentExecutable() }. collect { executable -> &...


1

Yes, but (to the best of my knowledge) you will have to use Scripted Pipeline within the shared library. This means that the closure that you will pass to the shared library (in the below example, the closure is sh 'run-tests') will also have to be Scripted. Jenkinsfile: pipeline { agent any stages { stage('Test') { steps { ...


Top 50 recent answers are included