Questions tagged [jenkins-pipeline]

Questions about the Jenkins “Pipeline” plugin suite (formerly “Workflow”). Not about pipelines in Jenkins in general (e.g. using downstream jobs).

0
votes
0answers
6 views

Disable changelog in Jenkins pipeline checkout

I have a Jenkins pipeline that checks out specific commits from several different repos. I would like to disable the calculation of the changeSet (changelog) since the /api/json call to the job takes ...
0
votes
0answers
13 views

java.lang.InterruptedException when I wait for node availability on Jenkins

I have created a method like to be called as myWaitNodeMethod('some name'): def call(String nodeName) { def computer = Jenkins.getInstance().getComputer(nodeName).getNode().toComputer() ...
1
vote
0answers
14 views

Maven update component version in all components using it

My project consists of numerous (~100) components, most of them use ~10 core components. When I update a version of a core component I would like to have up-to-date version of it in every component ...
0
votes
0answers
16 views

Parallel pipeline DSL: Mix between jobs details (downstream) due to parallel

When we are running pipline DSL job sometimes we got cases that in parallel some jobs has wrong details, for example, wrong URLs of the artifcats plug ins, maybe because of the parallel execusion, ...
0
votes
0answers
16 views

Jenkins pipeline SCM connect to private Github repo fails

I have a Jenkins pipeline which carries some tasks after some changes are made to the develop branch in the remote private repository. In the SCM section of the pipeline, I added the url to the ...
0
votes
0answers
10 views

Does not work execution of exe file from jenkins job, but works locally from cmd

I have Jenkins-slave on Windows 10. Jenkins service is running, from domain user jenkins. I tested each shell command from cmd. It works. But it does not work in Jenkins-job, when i am trying to ...
0
votes
0answers
11 views

Gerrit Trigger for new patch set through scripted pipeline

We have integrated Gerrit Code Review with Jenkins through Gerrit Trigger plugin, So with free style job able to validate each patch set pushed to gerrit. It is working perfectly. Now we have ...
0
votes
1answer
14 views

How can I chain build pipelines in a blocking fashion?

I am trying to configure a Jenkins pipeline in the following fashion : Build A , B and C non blocking as they don't depend on each other (but block on the fact that A , B and C are still building) ...
0
votes
1answer
14 views

Retrieve Repository URL field Jenkins

is there a way to call via code the GUI field "Repository URL" in order to use its value on my Jenkins pipeline?
0
votes
0answers
9 views

How to integrate Service Now in jenkins pipeline script?

I have to tried to integrate Service now with jenkins. i have installed the Service Now plugin https://github.com/jenkinsci/service-now-plugin/blob/master/README.md in my environment. I need to get ...
0
votes
1answer
13 views

How to exclude directory and files from NuGet package built with Octopack via Jenkins?

I have a windows service that I need to pack into a nuget package with OctoPack, but I have to exclude a directory called "Config" and a few other config files (these are instance specific and this ...
0
votes
0answers
21 views

Jenkins - How to run - docker system prune - in the pipeline

This is my Jenkinsfile for building docker image and pushing it to dockerhub. Everything works just great. I would like to clean up the untagged images after the build process. Currently I do docker ...
0
votes
0answers
10 views

Running YAML code in Jenkins Pipeline for Environment Provisioning

My company's tool stack for running a CI/CD pipeline include the following tools: Jenkins - Pipeline orchestration IBM UrbanCode Deploy (UCD) v6.2.6 - Application deployments IBM UrbanCode Deploy ...
0
votes
0answers
12 views

Add Build Step is not working in Jenkins for any of the option like “Execute Shell” or “Invoke Ant”

While configuring a job in Jenkins "Add Build Step" is not working for any of the option like "Execute Shell" or "Invoke Ant" Tried this step in all browsers like chrome and firefox and IE but got ...
0
votes
2answers
18 views

Replace a file content with environment values - Jenkins

In my Jenkins pipeline, I load the environment properties from a file using plugin. With this I would like to replace a file content with the environment variables loaded or available. Example: ...
0
votes
1answer
16 views

Set environment variables in Jenkins Declarative Pipeline

Below is my code for deploy stage in jenkinsfile stage('Deploy') { node('slave1') { if ("${env.Build_testapp1}" == 'true') { script { env.packageid = "Applications/...
-1
votes
1answer
11 views

how to skip the stage if my build stage fails in jenkins pipeline?

I am using three stages here , In this if my second stage Build fails it should skip the third stage copy. may i know how to use conditions here in pipeline job? node('') { stage ('clone'){ Build ...
3
votes
1answer
22 views

How do I retrieve last console output of a jenkins job using python-jenkins?

I'm unable to extract the jenkins console output of a given job using python-jenkins. I must to extract the full console output of a given build #. Here is how my jenkins url looks like: http://...
0
votes
1answer
23 views

How to get the master branch build numbers

I have recently started learning groovy. I am interested to know , is there a way to find get the build numbers of master branch. I have build numbers for different branches like hotfixes,patches , ...
1
vote
1answer
22 views

Is there a way to lock down deployments to only be during a specific time of day?

I want to be able to only deploy anytime between 9:00am and 6:00pm on certain days. I already have the builds locked down by day using "Set approvedDays" but I need one for hours.
0
votes
0answers
11 views

Download Maven artifacts in Jenkins from another repo if one fails

In my Jenkins build I have a settings.xml file for pulling Maven dependencies. An artifact, if not found, should be downloaded from another Maven repo not specified in a settings file. Can this be ...
0
votes
0answers
25 views

How to get the successful build numbers of master branch of another job using groovy

i am new to groovy script. i have 2 jobs deploy_job and build_job. i want successful build numbers of master branch of build_job I need to write a groovy script in deploy_job that gets the successful ...
0
votes
0answers
4 views

Does a Jenkins plugin exist that adds stage dependency to a pipeline, similar to how Gradle has dependsOn(), doFirst(), doLast() etc

I would like to have stages depend on each other to run in a Jenkins pipeline. Ideally I would be able to define the stages in any order within the pipeline, but have them execute according to their ...
0
votes
0answers
9 views

How to inject from environment variable from jenkins declarative pipeline to jelly template before sending mail in jenkins?

Exactly as in question. I defined environment variable in declarative pipeline of jenkins and want to pass inside jelly template at the end of the pipeline so the mail about failure contains info ...
0
votes
0answers
8 views

How can I get status of build in declarative pipeline below

script{ build job : 'somejob', parameters: [ extendedChoice(name: 'some_choice', value: "${env.some_choice}") ], propagate: false } echo "${currentBuild.Currentresult} ...
0
votes
0answers
24 views

How to trim the spaces in jenkins parameter value?

I am trying to build the pipeline job with parameters. If i have spaces in the parameter value the build is getting failed. I tried trim :true but it also getting failed. I am using jenkins version 2....
2
votes
0answers
48 views

How to create a build pipeline so that it can build multiple dependent repositories?

Currently we have two github repositories. Lets say it is repoA and repoB. We have some integration tests in repoA and some unit tests in repoB, and repoA depends on repoB. What we want is when the ...
0
votes
1answer
41 views

Dynamically Finding File to Upload to Artifactory Jenkins Pipeline

I have a Groovy library that takes a file at a directory and uploads it to remote host. The location of the artifacts to be uploaded changes dynamically. So I am trying to find the file based on regex....
-1
votes
1answer
18 views

GIT SCM configuration for bitbucket pull requests checkout using generic Webhook parameters

This stackoverflow page can help you checkout bitbucket pull requests in Jenkins with Generic webhook trigger. Pre-requisites: Jenkins: 1) Installing Generic Webhook Trigger Plugin and Bitbucket ...
0
votes
0answers
21 views

How to check python is installed on the node or not in jenkins pipeline?

I am trying to check whether python is installed on the node or agent. I have used declarative pipeline script to check below is my i have tried. i struck in this pipeline { agent none stages { ...
0
votes
2answers
26 views

When checking out a jenkinsfile from a Github repo, can the jenkinsfile call/start a python script from that same Repo?

I am starting a Jenkins pipeline script from SCM and Jenkins is able to read the jenkinsfile but cannot find the rest of the files in that repo. Does this need to be done in a differnt way, or even ...
0
votes
1answer
18 views

Jenkins Pipelines downloading tools

So I am using a Jenkins Pipeline to build some infrastructure with terraform on a slave. I then need to run some regression tests so I launch an on-demand cloud slave that can run these tests (the ...
0
votes
0answers
34 views

GitLab pipelines for merge requests in Jenkins

I'm working on a CI integration between GitLab and Jenkins where I want to do specific validation depending on the target branch of an opened merge request (MR). To be more specific, we have a ...
0
votes
1answer
18 views

Not able to attach file from Slave machine and email using emailext in Jenkins

I have a Master (Unix) and a slave Machine (Windows). I have created a Multibranch pipeline Project on Master and Trigger request all of the Process takes place in Slave. I am trying to send the HTML ...
0
votes
0answers
22 views

Jenkins Job-DSL job to pass parameters to jenkins-pipeline while job creation

I have a CI Seed Job DSL Job in jenkins which creates a jenkins pipeline job.Is there any possibilities to get parameters in CI Seed Job and pass the input parameters given in Seed job to the jenkins ...
0
votes
1answer
20 views

Jenkins pipeline: How to force a build to wait for previous build to finish

I have a Jenkins pipeline that automatically builds the latest code from a Git repository whenever there's a code update. The problem is that sometimes there are 2 or more code updates happening at (...
2
votes
1answer
26 views

Upload Local File by Using CURL Command in Shared Library Jenkins Pipeline

I am trying to upload a file from a local directory to a remote directory. I have a Groovy library that I have written to do this. def file = "$WORKPLACE/**/*-${BUILD_NUMBER}-*/file.txt" pulic ...
0
votes
0answers
22 views

Jfrog build retention deletes builds at random (instead of deleting the oldest build) using artifactory cloud

I made no code changes- seems like this just started happening I use the plugin in my jenkins pipelines like this: def artifactory = Artifactory.server 'me.jfrog.io' def buildInfo = Artifactory....
-2
votes
0answers
12 views

Jenkins pipeline for Git grade and push

I am working on gitops work for that I am building CI pipeline which includes below steps. Pull branch dev Build using gradle Pass code to Sonar Qube Check quality gate If positive then push that ...
0
votes
1answer
13 views

How to pass powershell variable from one session to another or from one stage to another in terms of Jenkinsfile

Every time I close the powershell session or window all the variable created in there is destroyed. Is there any command or way to create a variable which does not gets destoryed evenafter the session ...
0
votes
0answers
13 views

Jenkinsfile docker run volume sees empty ${WORKSPACE} directory

I have a Jenkinsfile pipeline that contains a stage with the following steps: steps { sh "ls ${WORKSPACE}" sh "docker run -w /projectroot -v ${WORKSPACE}:/projectroot alpine ls" sh "...
0
votes
1answer
14 views

How to skip stages in Jenkins based on capacity?

I am trying to introduce continuous delivery in an organisation where we currently don't have enough capacity to run all tests on all commits. The below is a simplified, fictional scenario, with made ...
0
votes
0answers
8 views

Running runValgrind and publishValgrind to run valgrind and receive output in Jenkins

I'm working on getting the valgrind plugin to work in jenkins. I'm a little stuck and was wondering how you called runValgrind and publishValgrind, and in which steps, for it to create output. ...
0
votes
1answer
23 views

aws key and scret working on aws cli but not working on jenkins

I am trying to run python script which has code to access s3 using boto3 sdk. I have created default profile in my windows machine. aws cli commands are working fine in window cmd to access s3 bucket....
0
votes
0answers
38 views

Unity3d games CI/CD requirements [closed]

I am new in this field and I need some help about unity games build and deployment. Did anyone configure jenkins build server for android and ios and myb deploying to hockeyapp. Is there any tutorial?...
1
vote
2answers
41 views

Jenkins Pipeline Best Practice: All in groovy or call powershell script

We have a jenkins build job. It has multiple steps with powershell, bat,plungins ... calls. The program is a windows application. I want to change the job to a pipeline file which is in the scm. I'm ...
0
votes
0answers
19 views

Using Ant library in groovy shared library for Jenkins

I have built a jenkins shared library to leverage for builds. I would to leverage ant because it has a lot of great utility methods for modifying files easily. However, I can't seem to get it to work ...
-1
votes
0answers
25 views

curl command ,how to pass newlines in the values of the data field,eg “body”:“hi\nworld\n” [closed]

The github release endpint is being connected through the curl command,used inside a jenkinsfile...so basically i have extracted some data in changesData i want to put the exact same data while ...
0
votes
0answers
37 views

Jenkins jnlp slave not working on local Kubernetes cluster

I have tried local minikube and kubeadm Kubernetes cluster and ran Jenkins server through https://github.com/jenkinsci/kubernetes-plugin and configured JNLP slave using. Following are the more ...
-1
votes
0answers
8 views

Authenticating EKS from jenkins

I want to authenticate against multiple EKS clusters from Jenkins to deploy my helm charts. I am unable to find a way to perform the same. I don't want to use JenkinX