Questions tagged [jenkins-pipeline]

For questions specifically about Jenkins 2.0's pipeline architecture. This includes both declarative and scripted pipelines.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Parametrized remote trigger with multiline string Jenkins

I have a Jenkins job which triggers a remote job. Both the jobs have a multiline string as paramter. I am not able to pass the parameter to the remote job. Only the first line of my input string is ...
0
votes
1answer
19 views

Checking Jenkins build status from only one pipeline and avoid from other pipeline pointing to same gitlab repo in PR build

Hi I am having two jenkins pipeline pointing to same git repo one pipeline is named as mainpipeline and other is sit pipeline. Before sit pipeline our git PR build is checking the build status from ...
0
votes
1answer
20 views

Jenkinsfile credential as paramter unable to use it

I am trying to use the credentials parameter for a git clone. But i am getting the error that the variables are not found Param definition credentials (credentialType: 'Username with password', ...
0
votes
1answer
24 views

Jenkinsfile update using version control

I've a Jenkinsfile in the master branch of the repository with following code pipeline { agent any stages { stage('A') { steps { sh 'echo "Step A"'...
0
votes
0answers
15 views

Can you limit the scope of the “post” block in Jenkins to the stage result status?

I am trying to execute a script based on the result of a particular stage in a Jenkins declarative pipeline, but the post block seems to be dependent on the status of the entire pipeline. Any way of ...
1
vote
1answer
36 views

Jenkins downstream pipeline jobs not always triggered as expected

I have three separate Multibranch pipeline jobs set up on Jenkins, which I want to be called sequentially as downstream-jobs. Please note that, all these 3 jobs have separate git repositories! Each ...
0
votes
1answer
23 views

Auto create Jenkins jobs for branches and pull request via declarative code in scm

I am looking to auto create jobs in jenkins upon pull request , branches, master push etc similar to what we do in Gitlab. My SCM is butbucket here. I have so far setup docker based agent integration ...
0
votes
1answer
27 views

Jenkins Docker - Make changes to gitconfig

I have a self-hosted Gitea organization, and the way to access the repos requires some "secret" extraheader in .gitconfig. (2FA is also enabled) When I look at Jenkins "Configure System&...
0
votes
0answers
9 views

Why maven build slows in docker container when local maven repo mapped to container's /usr/share/?

We run Jenkins pipeline on docker container. During the run, we mount host's .m2 to container's with - -v $HOME/.m2:/usr/share/.m2 When host's .m2 mounted into container's /usr/share/.m2 maven build ...
1
vote
0answers
22 views

Parallel execution of same job with different configuration- pipeline jenkinsfile script path is updated incorrect

I have a jenkins job A and i have 5 tests (each triggering job A with updation of different jenkinsfile script path as Before Each test) executing in parallel Test1 with pipeline-jenkinfile-1 Test2 ...
0
votes
1answer
98 views

How can I add a when clause for a specific upstream trigger in a Jenkins declarative pipeline?

I have a job defined as a declarative pipeline that gets triggered by a number of different upstream jobs. Depending on which upstream job triggered my job, I don't necessarily need to run all of the ...
0
votes
1answer
82 views

Add stages to Jenkins declarative pipeline through shared library

Is there a way to write a stage in a Jenkins shared library so that it can be added to declarative pipelines? Background For many projects, I need to run tests on multiple different servers. My ...
0
votes
0answers
100 views

How to configure Bitbucket Build Status Notifier Jenkins plugin to connect to BitBucket Cloud for Jenkins Pipeline projects

I would like to know how to configure Bitbucket Build Status Notifier Jenkins plugin to connect to BitBucket Cloud for Pipeline projects. Basic instructions are here, on a plugin homepage: https://...
1
vote
1answer
33 views

Jenkins: Access job/plugin configuration values inside pipeline

I am trying the access the values set on a job's configuration page from within my pipeline. These values are not made available as params, nor are they injected as envvars. Setup Jenkins, v2.263.1 ...
1
vote
1answer
379 views

Skip stages in Jenkins pipeline

I am using a scripted pipeline where I am required to skip some stages conditionally.Is there a way to show skipped stages on Jenkins UI other than importing org.jenkinsci.plugins.pipeline....
0
votes
1answer
230 views

Jenkins declarative pipeline Warning: JENKINS-41339 probably bogus PATH

I am struggling with this issue inside my declarative pipeline. I am trying to use python's docker image as my agent and run some scripts and I am receiving warning: Warning: JENKINS-41339 probably ...
1
vote
1answer
32 views

how to update .env file in production while Jenkins deployment

how to update the .env file in production while Jenkins deployment? we have not committed the .env file in git for security reasons.
0
votes
1answer
15 views

jenkins build overview page not showing stages in webui

I'm using the image: jenkinsci/blueocean from Dockerhub The build overview page isn't showing the stages of a build. i.e. the square boxes that represent the stages are not appearing. Am I missing a ...
0
votes
0answers
60 views

How to use jenkins build parameter in web ui?

I have a ready jenkins build parameters , I want to use/link the same in webpage UI (that to be created). Need help on - what are various possible way to achieve this ? any document , link would be ...
0
votes
1answer
118 views

How can I check if there is a new build the same jenkins pipeline

I have a github multibranch pipeline, in declarative format. It is configured to trigger on pushes to pull request branches (ie, branches which are included in pull requests to a target branch, say ...
0
votes
0answers
39 views

Jenkins Declarative Pipeline not running

I have just upgraded the jenkins version and wrote my first Jenkins declarative plugin. Following is the pipeline definition pipeline { agent any stages{ stage('Welcome'){ ...
2
votes
1answer
455 views

branch specific jenkins pipeline trigger

I am trying to trigger a jenkins pipeline job only when a pull request has been approved & merged to a specific github branch in our CI/CD implementation. currently whenever i merge a PR to ...
2
votes
1answer
48 views

Pass information between Jenkins Job builds

Please excuse my non-fluent terminology.. There is a Jenkins server, master and a few slaves, there is a pipeline job.. let's call it playground I run the job once, I want to save some data somewhere. ...
0
votes
0answers
7 views

Run check on a sample of CI events

Suppose we have a very expensive test in terms of time. This may be some kind of deep analysis or performance test. I would like to run this on a sample of CI events in a Jenkins pipeline, say 20% of ...
1
vote
0answers
18 views

How can I configure Jenkins pull request builder to run tests on Github dependabot PRs

Our Github project repository is configured to receive security PRs from dependabot, and we get them periodically. We are using Jenkins with Build Triggers so that when a user comments /test in a PR ...
0
votes
0answers
460 views

how to check if a pipeline variable is empty

Team, I have a Jenkins job that runs every 5minutes and sends a slack notify to channel. but I want to not send slack if there is 0 returned in count variable. how to achieve this? like with if else ...
1
vote
1answer
386 views

Extended Choice Parameter: How to load params dynamically from any file for jenkins build job

Though below code works fine individually: extendedChoice description: '', multiSelectDelimiter: ',', name: 'Capablities', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_CHECKBOX',value: ...
1
vote
0answers
13 views

Allow specific AWS permissions(Lambda, S3) / roles to specific Jenkins Jobs within same AWS account

We have one AWS account in which an Ec2 instance is running where Jenkins is installed, and we have attached an IAM role to it, with s3 access permission. We have Jenkins jobs which needed aws ...
1
vote
1answer
50 views

How to handle services when the developers provide incorrectly in k8s

I provided the script to provision a new feature environment inside k8s it will create all the configs required, namespaces, resources and whatever... in my script, I described this param: parameters {...
5
votes
1answer
2k views

What is the difference between Jenkin's `Replay` and `Rebuild` options?

If you want to re-run a Jenkins job, you can click the Rebuild button which sometimes appears as the Replay button. What is the difference Rebuilding a job versus Replaying it? Why is it that some ...
0
votes
2answers
55 views

Jenkins: Re-use repository with reference option and do changes on it

I would like to setup a Jenkins cluster where the slaves are building an Android ROM with some parameters like branch (e.g. lineage-16.0) and some optional patches. The whole repository will consume ...
1
vote
1answer
45 views

CI/CD pipeline with manual advancement?

I am currently learning about CI/CD pipelines for DevOps. I have some practice implementing them in some basic scenarios, but I've recently encountered a slightly more complex scenario and I'm not ...
1
vote
1answer
109 views

How do I use Jenkins to maintain versioning on a Python project?

An independent Jenkins server monitors my develop branch in Team Foundation Server's Git repository and builds a new package when it's updated. The problem I'm having is that it uses the same version, ...
0
votes
1answer
233 views

What is the best approach to deploying to multiple servers using Jenkins?

Trying to figure out the best approach for deploying to multiple servers using Jenkins Blue Ocean pipeline. We will have six servers in development, six in QA, six in Staging, and six in production. ...
0
votes
1answer
534 views

Jenkins Not pulling the latest commit into master or slave

I have a Jenkins pipeline where after every build I change a file(increase build version in a property file) and checkin back to the git repository. After a build, I commit some differnt code change ...
1
vote
0answers
34 views

How can i deploy docker image into kubernetes cluster using Jenkins single job run

Certificate will be generated by a tool Jenkins instance installed. Need to automate certificate renewal process for kubernetes cluster.
1
vote
1answer
278 views

Jenkins Declarative Pipeline: Can Jenkins execute a dynamic list of jobs?

Context: I have a long dynamic list of builds calls that I am currently executing in parallel successfully. Example below. Problem: In some specific moments it is required to run that list of builds ...
1
vote
1answer
185 views

Unable to get value of password parameter into another parameter

In Jenkins pipeline parameter say Branches of type Active Choice Reactive Parameter, I've to auto-populate branch names hence I've following command, which I can execute in parameter's Groovy script - ...
1
vote
1answer
1k views

How to get logged in username of Jenkins in parameter's Groovy script?

In Jenkins parameter, I'm writing Groovy script and in that script I need to pass Jenkins logged in username NOT user. User and username, could be different Ex - User, that is displayed left to 'log ...
2
votes
0answers
374 views

Passing parameters of extendedChoice type to Jenkins Pipeline via jenkins-cli.jar

I have the following declarative pipeline. It defines checkbox multi-choice parameter: pipeline { agent any options { ansiColor('xterm') } parameters { ...
2
votes
1answer
56 views

Docker calls to detect app crashing inside it

Is there a way to know if an app has crashed inside docker using maybe bash script or API call from host container, am implementing CI/CD using Jenkins and will be deploying the built app via ssh to ...
2
votes
1answer
166 views

simulate post step for dynamically generated Jenkins pipeline stages

The following simplified Jenkinsfile dynamically generates sequentially executed stages; however, I cannot create a post step for these dynamically stages, like so: pipeline { agent none ...
2
votes
1answer
48 views

Pass environment variables from pipeline job A to pipeline job B

I passed params to pipeline B and set the environment variables from parameters. However, "${params.URL}" is evaluated as null. Pipeline A is declared in Jenkinsfile: pipeline { agent any ...
0
votes
1answer
2k views

Jenkins Plugin:Extended Choice Parameter from JSON file

Extended Choice Parameter plugin query: How to load params dynamically from a JSON file for jenkins build job. Here is my jenkins script to add normal parameters and Extended Choice parameters as well....
2
votes
1answer
86 views

How can I retrieve the execution status of parallel triggered child jobs to a pipeline script

I have a pipeline script that executes child jobs in parallel. Say I have 5 data (a,b,c,d,e) that has to be executed on 3 jobs (J1, J2, J3) My pipeline script is in the below format for (int i = 0; ...
1
vote
0answers
90 views

How to use superclass and subclass in Jenkins shared library?

I am trying to create super class (common) and a subclass (specific), my plan is to have the common functions defined in super and override it in subclasses as needed, I am trying to write/run my very ...
1
vote
1answer
812 views

Unable to use the class defined in src in vars of jenkins shared library

Here is the folder structure in my shared library repo: $ tree src vars src ├── org    └── common.groovy vars ├── testSrc.groovy src has: $ cat src/org/common.groovy package org.common class ...
1
vote
1answer
200 views

How to add job dependency to gerrit trigger in Jenkins pipeline?

We do have this configuration in our GUI based Jenkins project, trying to convert it to Jenkins pipeline, couldn't find how to add precurse-build as dependent build as shown in red below. I added ...
3
votes
1answer
48 views

It is not allowed to use stages more than once [Jenkins_Declarative_Pipeline]

I am completely new to the jenkins pipeline. I'm trying to create a project with multiple stages but in my Import stage , I want to execute parallel. For each stage in parallel , I have again multiple ...
1
vote
1answer
2k views

Jenkinsfile script to waitUntil a folder is created

With this Jenkinsfile code, I am trying to test A/B folder creation, and also testing if waitUntil works till the folder is created, I expect it to wait for 0 secs as the folder is created before ...

1
2 3 4 5