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.


-1

Take a look at this Jenkins Plugin: https://plugins.jenkins.io/slave-status/ It'll expose a healthcheck endpoint + other information like memory on port 3141 (you can configure a custom port). You can then ping that healthcheck endpoint and send the data to CloudWatch.


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 ...


0

We found out what was wrong. It was not an Azure issue. The problem was that we were deploying a bad ZIP file. The ZIP file was missing web.config, which meant that the web application could not start up. We were zipping our published web application by having this in the CSPROJ file: <Target Name="ZipOutputPath" AfterTargets="Publish"&...


1

Put it inside the sh? withKubeConfig(...) { sh “”” export ... kubectl ... “”” }


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 { ...


0

An elegant way is to use IFS environment variable (Internal Field Separator) to define a delimiter when assigning a string list to array. IFS="," SERVERS=($SERVERS) #BTW, no need to declare a new variable, just reassign for SERVER in ${SERVERS[@]} do echo $SERVER done


Top 50 recent answers are included