Category "jenkins-pipeline"

Abort Jenkins pipeline (workflow) build after timeout

Whenever a build gets stuck of fails somewhere the timeout kicks in but the build is not aborted and it is stuck running forever until you cancel the build, go

How to retrieve current workspace using Jenkins Pipeline Groovy script?

I am trying to get the current workspace of my Jenkins build using a Groovy pipeline script: node('master') { // PULL IN ENVIRONMENT VARIABLES // Jenki

How to use a FileParameterValue in a jenkins 2 pipeline

How can a file from the current project workspace be passed as a parameter to another project. e.g. something like: build job: 'otherproject', parameters: [[$

How to define a variable in post section of pipeline?

I want to use some common value across different conditions in post section of pipeline hence I tried following - 1. post { script { def va

Get username logged in Jenkins from Jenkins Workflow (Pipeline) Plugin

I am using the Pipeline plugin in Jenkins by Clouldbees (the name was Workflow plugin before), I am trying to get the user name in the Groovy script but I am no

Jenkinsfile Pipeline DSL: How to Show Multi-Columns in Jobs dashboard GUI - For all Dynamically created stages - When within PIPELINE section

Jenkins 2.89.4 rolling I saw almost all stackoverflow posts which show how we can successfully run parallel steps/stages (using list/maps etc) --OR hardcoding

Required context class hudson.FilePath is missing Perhaps you forgot to surround the code with a step that provides this, such as: node

When i load another groovy file in Jenkinsfile it show me following error. "Required context class hudson.FilePath is missing Perhaps you forgot to surround th

Reuse object/property in different stages of a declerative pipeline in Jenkins

We create a new maven build: def rtMaven = Artifactory.newMavenBuild() Now we want to reuse this rtMaven in a different stage than the current one; like in t

Run maven deploy without re-running the entire build

I'm working on a multi-branch pipeline for a maven project. I'm trying to follow what the Jenkins docs keep referring to as the standard CI steps, Build, Test,

Jenkinsfile Declarative Pipeline defining dynamic env vars

I'm new to Jenkins pipeline; I'm defining a declarative syntax pipeline and I don't know if I can solve my problem, because I didn't find a solution. In this e

Jenkins groovy - How to retrieve tag from latest commit?

To fetch the latest commit from branchName, we run below code: treeMapData = git(branch: branchName, credentialsId: credential, url: "${gitLabServer}/${project

Jenkinsfile - get all changes between builds

With reference to this question is there a way to get the equivalent information from when using the mult-branch pipeline? Specifically - the list of commits si

How to reuse workspaces between branches with multibranch pipeline on Jenkins?

I've set up multibranch pipeline to track my repo and automatically build and test for all merge requests. It works wonders, however, I noticed that Jenkins cre

How to add a JDBC driver to a Jenkins pipeline?

I want to create a database within a pipeline script to be used by the deployed app. But first I started testing the connection. I got this problem: java.sql.S

trigger jenkins build on tag creation with multibranch pipeline

I've got a stage in my Jenkinsfile for building from a tag matching a tag name filter: stage('Build Release from Tag') { when { tag '*R

Jenkins multibranch pipeline won't prune deleted branches

We're currently having some trouble with the bitbucket branch source plugin used to handle a multibranch test job in one of our Jenkins instances (productive in

file parameter in declarative pipeline

I am developing declarative pipeline and want to use file parameter to read its content, but its not working as expected parameters{ file(fileLocation:

Executing Same Jenkins job by picking fail_skip xml once first execution is over

I am from QA automation and pretty new to jenkins, below is my case Process: I have a jenkins job which picks up a file criticalsuite.xml (testng) and triggers

How do I skip a Jenkins stage after executing some of its steps (like the when directive)?

How do I skip a Jenkins stage partway through its execution? It would be like using when after some steps or in the middle of a step, once the skip condition ha

Artifactory test connection from jenkins gets failed with timed out

I'm using Jenkins Artifactory Plugin and I have this error: Error occured while requesting version information: connect to [myurl..:8081] failed: connection