Jenkins pipeline bubble up the shell exit code to fail the stage

Absolute Jenkins pipeline/groovy noob here, I have a stage stage(‘Building and Deploying’){ def build = new Build() build.deploy() } which is using the shared lib, the source of the Build.groovy is here: def deploy(branch=’master’, repo=’xxx’){ if (env.BRANCH_NAME.trim() == branch) { def script = libraryResource ‘build/package_indexes/python/’ // TODO: Test out env.PYPI_REPO = repo sh script […]

Jenkins Extensible Choice with user specific items based on users Roles

I have a situation where I would like to alter the contents of a choice parameter in a Jenkins parametrised build. In my case I would like one project for deploying the application ‘Deploy My App’. When building this project the user is presented with a choice parameter. I would like to alter the contents […]

Docker Plugin for Jenkins error: Scripts not permitted to use method

I’m trying to publish to Docker from my Jenkins Pipeline but most things I try result in an error. My latest try was this: docker.withDockerRegistry(‘’, ‘docker-credential’) { def image = docker.image(APPLICATION_NAME); image.tag(“latest”); image.push() } When I run this, Jenkins outputs this error: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object (org.jenkinsci.plugins.docker.workflow.Docker withDockerRegistry […]

Schedule Fortnightly jobs on jenkins

I wanted to schedule fortnightly job on jenkin . It should run every other Monday . I am not able to figure out the cron expression

Access AWS CodeCommit from Jenkins running on EC2 (Ubuntu)

I’m trying to integrate Jenkins with AWS CodeCommit. Jenkins is running on an AWS EC2 Instance with Ubuntu 14.04. I followed this Blogpost: The problem is, that sudo -u jenkins aws configure isn’t executed because the jenkins user has no permissions. What would you do? The following commands aren’t working as well: sudo -u […]

Jenkins pipeline code auto trigger with multiple repositories through GitHub Organization Folder Plugin

This question is related to the Jenkins job auto trigger with multiple repositories. Defined 3 repo’s to checkout in Jenkinsfile. node(‘slave’){ git clone -b ${env.BRANCH_NAME} git clone -b ${env.BRANCH_NAME} git clone -b ${env.BRANCH_NAME} } Configured Jenkins job using Github organization plugin. In this case my Jenkinsfile is in abc repo and the […]

Jenkins declarative pipeline: What workspace is associated with a stage when the agent is set only for the pipeline?

Here is an example of declarative pipeline where the agent is set for the pipeline but not set in the individual stages: pipeline { agent { node { label ‘linux’ } } stages { stage(‘Checkout’) { steps { checkout scm } } stage(‘Build’) { steps { sh ‘make’ } } } } Documentation I’ve found […]

How do you run SOAP UI test suite with Commandline tool like Jenkins

I am new to soap ui and Jenkins how do you run soap ui test suites using Jenkins? how do you generate reports in soap ui?

Bitbucket Build Erring after triggered from Commit

I am trying to trigger builds automatically when a commit is made using the BitBucket plugin. I seem to have things setup correctly with the Web Hook and checking the box in the project to “Build when a change is pushed to BitBucket”. When I commit, I am seeing a message in the BitBucket Hook […]

Bash – check for a string in file path

How can I check for a string in a file path in bash? I am trying: if [[$(echo “${filePathVar}” | sed ‘s#//#:#g#’) == *””* ]] to replace all forward slashes with a colon (:) in the path. It’s not working. Bash is seeing the file path string as a file path and throws the error […]

Git Baby is a git and github fan, let's start git clone.