Hot answers tagged

2

This pipeline will run each day at 1 AM. It'll restart if the build fails. pipeline { agent any triggers { cron('0 1 * * *') } stages { stage ('Build') { when { expression { // When last build has failed !hudson.model.Result.SUCCESS.equals(currentBuild....


2

If your question is can Jenkins deploy to machine B then the answer is absolutely! Jenkins provides documentation on deployments here, and has an example of a multibranch pipeline deployment here. If you want machine B to deploy to a different computer (e.g. machine C) then you can do this by configuring machine B to be an "agent", and following the ...


1

First of all, a job should always be green on the first run in my opinion. I know that it can be very difficult, but every issue should be solved. That having said, we have also some jobs that get green after 5 retries. It are selenium tests that are very brittle and we do not get the time to fix them. Once a retry was added the builds are green for a couple ...


1

If you're running this code today via script console, you're probably running into a RejectedAccessException from the sandbox which is why you require admin access to run this coupled with and or needing administrator access to use the script console. If you put this code into a shared library, the code becomes trusted, and you no longer require ...


1

For the record, The following snippet to be pasted into the console also does the job : def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class, Jenkins.instance, null, null ) for(c in creds) { if(c instanceof com.cloudbees.jenkins....


Only top voted, non community-wiki answers of a minimum length are eligible