Questions tagged [jenkins-pipeline]
For questions specifically about Jenkins 2.0's pipeline architecture. This includes both declarative and scripted pipelines.
211
questions
1
vote
0answers
10 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
13 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
21 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
8 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
15 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
51 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
28 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
43 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
28 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
79 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
140 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
28 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
55 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
66 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
36 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
253 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
45 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
6 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
309 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
180 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
49 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 {...
4
votes
1answer
1k 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
1answer
38 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
41 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
49 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
119 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
377 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
212 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
134 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
804 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
243 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
129 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
46 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
62 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
71 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
628 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
165 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
45 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 ...
3
votes
1answer
33 views
Using DevOps pipelines to create distribution bundles of applications
We want to create bundles of our applications in order to distribute to clients etc. An application can have more than one component. Ex: an application can have a spring server and a scheduler so in ...
1
vote
1answer
69 views
Running parallel builds from jenkins pipeline job triggers and waits for same job on other project
I have this test pipeline code, it runs 2 build on different nodes on build_servers as expected.
pipeline {
agent { label 'myserver' }
stages {
stage('1') {
steps {
...
0
votes
1answer
323 views
Jenkins transferring file using publish over SSH plugin but file not show in remote development server
I have a running a jenkins job by jenkins pipeline. i wants to send an environmental (.env) file from my local system to my server using Publish Over SSH Plugin.
Here is my jenkins snippet:
stage('...
0
votes
2answers
374 views
unable to login using docker registry on jenkins
I have a Jenkinsfile that I need to login to ECR. this is the relevant section
script {
docker.withRegistry('https://01234.dkr.ecr.ap-southeast-1.amazonaws.com/', 'awsId'){
...
1
vote
2answers
189 views
Trigger downstream pipeline job for the branch via from upstream freestyle job
I have an upstream freestyle job and a downstream pipeline job.
The freestyle job is triggered via a gitHub webhook to run whenever code is pushed to gitHub branch.
The freestyle job should capture ...