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
1answer
24 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 ...
0
votes
0answers
13 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. ...
1
vote
1answer
37 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 ...
1
vote
0answers
40 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....
1
vote
1answer
30 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 ...
2
votes
1answer
41 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 ...
0
votes
0answers
7 views

Mention Slack user about failed build on Jenkins

Team. I've been trying to add something like $env.{GITHUB_AUTHOR} to my pipeline scripts, so that whenever a build fails, the format @$env.{GITHUB_AUTHOR}would mention the user on a given channel. ...
1
vote
0answers
25 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....
1
vote
1answer
73 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 ...
0
votes
1answer
19 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 ...
1
vote
2answers
97 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 ...
0
votes
0answers
20 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 ...
1
vote
1answer
40 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 { ...
1
vote
2answers
50 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 ...
1
vote
0answers
17 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']) { ...
-1
votes
1answer
132 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 ...
1
vote
0answers
18 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 ...
2
votes
1answer
79 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 ...
0
votes
1answer
1k 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}&...
0
votes
1answer
91 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 ...
0
votes
1answer
52 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 ...
0
votes
1answer
70 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
40 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', ...
1
vote
1answer
111 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"'...
1
vote
1answer
184 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
36 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
286 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&...
1
vote
0answers
36 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
787 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
631 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 ...
1
vote
1answer
77 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
2k 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
598 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
90 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
43 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
1answer
414 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 ...
3
votes
1answer
1k 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
57 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. ...
1
vote
0answers
27 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 ...
1
vote
1answer
2k 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
17 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 {...
8
votes
1answer
5k 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
87 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
98 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
415 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
819 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
1k 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
1answer
586 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
297 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
2 3 4 5