Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 answers
9 views

Azure DevOps Pipeline Calling Jenkins just keeps running When Pipeline in Jenkins is completed

We are calling a Jenkins Pipeline from Azure DevOps. Our Jenkins server is behind firewall and installed on Linux VM on Azure Cloud. To Call the pipeline from Azure DevOps we placed a self hosted ...
user avatar
0 votes
0 answers
12 views

"Lazy-building" of libraries with Jenkins

I have a project with multiple "products" which all use a common shared library. This shared library is a very great proportion of the compilation effort, so it would be good if we could ...
user avatar
0 votes
0 answers
7 views

Understanding Jenkins plugins and agent

I was trying to understand jenkins agents. This page asks to first create jenkins docker agent. But it doesnt say where to execute these steps? Q1. Should we be executing these steps on node or a ...
user avatar
  • 121
0 votes
1 answer
49 views

Read and parse json file from workspace on slave node

I have a Jenkins job which runs on a slave node on another machine, both master and slave run on windows. The slave node is being run as a windows service. I am unable to read a json file from ...
user avatar
0 votes
1 answer
39 views

Create a folder in slave node using Jenkins pipeline groovy script

I have a Jenkins job which runs on a slave node on another machine, both master and slave run on windows. The slave node is being run as a windows service. The main repository has git submodule ...
user avatar
2 votes
0 answers
21 views

Jenkins declarative pipeline with mvn, releases and versioned artifactory

We have a requirement to support human defined versions (not auto generated) for patch releases. I'm trying to figure out a way to do this in Jenkins. We have: BitBucket, Jenkins, Nexus/JFrog (either)...
user avatar
  • 121
0 votes
0 answers
10 views

How to run two views in Jenkins and run multi Jobs parallelly?

How to add the views in pipeline script to run the views parallelly. I have different views like EX: view name: Project A --> Project A consists of different jobs like job1, job2,...etc view name: ...
user avatar
  • 1
0 votes
1 answer
32 views

How to use the Shared Workspace plugin in a Jenkins pipeline?

I want to use the Shared Workspace plugin, so I set up the following key/value pair in my Manage Jenkins -> Configure System -> Workspace Sharing Name: sandbox-workspace Repository URL: git@...
user avatar
  • 285
1 vote
0 answers
24 views

Add Cache-control: no-cache,no-store metadata to object uploaded via S3 Publisher plugin in Jenkins

So i have a jenkins job that builds a project and then uploads specific files to an S3 bucket. I've set up the S3 Publisher plugin shown in the attached image, but the metadata is still not being ...
user avatar
0 votes
0 answers
7 views

Sonarcube from JenkinsFile not able to get the customised pom.xml path to run sonar:sonar mvn command

I want to run the SonarCube report from my project from jenkinsfile. I am using below stage to run sonarcube report. stage('SonarQube Code QualityCheck') { steps { bat '...
user avatar
  • 101
0 votes
0 answers
28 views

Access denied while pushing image to GCR via a Jenkins job

I'm running into a strange issue where my Jenkins job fails with the following error while pushing the docker images to GCR. Although if I SSH into that particular Jenkins worker node and run the step ...
user avatar
  • 273
0 votes
0 answers
43 views

start downstream jenkins job at specific commit

We're using declarative pipeline files to trigger jobs inside source control. I have one pipeline for testing, and another pipeline for deploying. I know if testing passes I can use buildJob to start ...
user avatar
  • 101
2 votes
2 answers
239 views

Shared Jenkinsfile for multiple pipelines (separate source repositories)

I'd like to write one Jenkinsfile to be shared between a number (~50) of pipelines/jobs, where each job handles the creation of a library from a specific source (git) repository. Currently I have one ...
user avatar
0 votes
0 answers
54 views

Mention users on Slack for failing builds

Scenario: I have jobs with Jenkinsfiles where I can get the env.BUILD_USER_ID exposed by a Jenkins plugin. So, what I`m planning to do is associating this variable content to the Slack user ID value, ...
user avatar
0 votes
1 answer
168 views

Can one run a docker container with systemd from a jenkins pipeline?

I have been unsuccessful running a docker container with systemd from a jenkins pipeline without getting the following error message: ERROR: The container started but didn't run the expected command. ...
user avatar
0 votes
2 answers
185 views

What is the best practice for a multibranch pipeline configuration?

I'm messing around with a multibranch pipeline in jenkins. Currently we have zero pipelines in production and everything is using freestyle jobs which is very sloppy. I have my own multibranch ...
user avatar
0 votes
1 answer
58 views

Execute python file existing inside image with Jenkins

I have an Image A, which has a python file "main.py". I want to know how I can use Jenkins to run that file from a different pipeline. I want to use Jenkins to go inside that image and then ...
user avatar
0 votes
1 answer
155 views

Checkout shared library with tag with legacySCm

So trying to checkout shared library by tag. This works perfectly with moderSCM, but for reasons we need to use other way (legacySCM); def lib = library identifier: 'jenkins-shared-library@41', ...
user avatar
  • 101
0 votes
2 answers
62 views

Recommended starting guide on CICD

I'm new to the community, and I looked around a bit but didn't find a good point to start from. I have a specific problem I want to solve, but while trying to think of a solution I realized I need a ...
user avatar
0 votes
0 answers
19 views

Jenkins - How to reserve a resource for a branch in a multibranch pipeline

I have a small group of developers working on tickets from our customers. What we need is to be able to allow fast testing by the users to validate de changes done in their tickets by the developers. ...
user avatar
1 vote
1 answer
84 views

Run multiple (dynamic list) other jobs from a single job

I have 30+ jobs in jenkins that deploy code. For any release, it could be 1 to 30 of those jobs that need to be run. Each job is standalone and deploys its piece independently. For simplicity let's ...
user avatar
1 vote
0 answers
306 views

net.sf.json.JSONException: Invalid JSON String error on jenkins

Warning: API call to create metrics set failed: [Pipeline] echo net.sf.json.JSONException: Invalid JSON String at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:143) at net.sf.json....
user avatar
1 vote
1 answer
133 views

Why does Jenkins' Stage View not show my jobs as ending?

I am using Jenkins' remote API (XML & JSON) to submit Jobs, run them & retrieve the logs. When observing the jobs in Stage View, I noticed that (following a change in my "submission ...
user avatar
  • 113
2 votes
1 answer
213 views

Re-running a pipeline job if failed

I've heard about the Naginator plugin, but unfortunately it's only for freestyle job type. Is there any solution for pipeline jobs to be triggered if they failed? I thought about creating a command in ...
user avatar
1 vote
0 answers
59 views

Jenkin "unable to find valid certification path to requested target" getting error while installing plugin

We are trying to set up jenkins. When we trying to install plugin getting the below error. We also tried to import the trusted certificate into the JVM directly still getting same error. sun.security....
user avatar
1 vote
1 answer
128 views

Package installed using Dockerfile not available on Jenkins pipeline stage

I'm having sort of a weird problem with my Jenkins pipeline. I've defined a Dockerfile which installs some tools I need for my CI/CD pipeline, such as node, npm, sfdx, and sfpowerkit (a plugin for ...
user avatar
0 votes
1 answer
123 views

Jenkins Pipeline job does not use Squid Proxy

I have configured a Squid Proxy and it seems to be working when I add below Env variables to the /home/user/.bashrc file to a client machine. Note: SSL Bump is configured, Self Signed Cert is added to ...
user avatar
1 vote
2 answers
794 views

Send command to docker image while start in Jenkins file

In scripted Jenkinsfile if I need to send a command to Docker image, I can do like this: docker.image('mysql --default-authentication-plugin=mysql_native_password') How can I do the same in ...
user avatar
  • 11
0 votes
0 answers
125 views

Pass values from a python script to another Jenkins execution

I'm new to Jenkins and my main programming lenguage is Python, therefore, I want to use Python the more I can to make every step. My doubt right now is how to pass an argument from an execution to ...
user avatar
1 vote
1 answer
168 views

Jenkins Pipeline - conditional execution with branch and 1 other parameter (manual)

We are deploying our application using Jenkins pipeline like this - pipeline { agent any stages { stage('Build For Production') { when { branch 'development' } steps { ...
user avatar
1 vote
2 answers
124 views

Jenkins pipeline retry option triggers two builds at a time, one in execution state other in pending state for a single click

For example I have clicked on retry option at build number 2 in Jenkins pipeline view, where as build number 3 gets start and build number 4 also gets start and awaits at pending state. Why the build ...
user avatar
  • 11
1 vote
0 answers
24 views

Application deployed in tomcat cannot be started through Jenkins pipeline [closed]

I've deployed an application deployed in tomcat and want to restart and hence stop it first and then start it with following code - def startServer() { withEnv(['JENKINS_NODE_COOKIE=dontkill']) { ...
user avatar
  • 153
-1 votes
1 answer
464 views

How to get ConsoleFull Output,changeLog of upstream job along with downstream jobs console full output and changeLog in jenkins pipeline jobs!

Lets say we have Jobs A , B , C ,D and E. Job A triggers Job B ; Job B triggers Job C; Job C triggers Job D;, Job D triggers Job E; When one of the child job fails for example: Job c fails then email ...
user avatar
  • 1
1 vote
0 answers
23 views

Our code is behind a firewall and we don't want to put source code in cloud. Are there any good CI/CD using local agents for Azure/Github actions

Our source code is in our servers and we don't have approval to put it in cloud. We don't have a seamless CI/CD. Can we use Azure pipeline agents or any local agents to build our code and only export ...
user avatar
2 votes
1 answer
162 views

What are ways to structure a webhook-triggered job that triggers a human-triggerable job?

I hope it's okay to ask for recommendations here. I'm very new to devops, and am trying to get into the headspace of involved technologies and workflows. I've created a webhook in my Bitbucket project ...
user avatar
0 votes
1 answer
3k views

Why does Jenkins Pipeline script returnStatus value not match status examined in shell?

This is my little newbie Groovy script, trying to cobble together a very beginner understanding of Jenkins Pipelines: node { stage("hello") { def var = "val" echo "${var}&...
user avatar
0 votes
1 answer
417 views

Where is Jenkins Pipeline script stored and can I control it?

Several tutorials I'm referencing to learn about Jenkins Pipeline scripting guide one to create Jenkins Pipeline jobs as follows: Click New Item in the left pane. Click Pipeline and enter an item ...
user avatar
0 votes
1 answer
196 views

Why are variables with fixed values not visible in Jenkins Pipeline stage?

I'm new to DevOps, and am cobbling together a beginner understanding from lots of reading, YouTube videos, and online examples. I've had initial success adapting this helpful tutorial. I.e. in my ...
user avatar
0 votes
1 answer
137 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 ...
user avatar
0 votes
1 answer
63 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', ...
user avatar
  • 123
1 vote
1 answer
253 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"'...
user avatar
  • 273
1 vote
1 answer
411 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 ...
user avatar
  • 13
0 votes
1 answer
92 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 ...
user avatar
  • 3
0 votes
1 answer
625 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&...
user avatar
  • 103
1 vote
0 answers
46 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 ...
user avatar
  • 111
1 vote
1 answer
2k 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 ...
user avatar
  • 135
0 votes
1 answer
1k 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 ...
user avatar
  • 105
2 votes
1 answer
141 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 ...
user avatar
1 vote
1 answer
4k 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....
user avatar
0 votes
1 answer
1k 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 ...
user avatar

1
2 3 4 5