Questions tagged [jenkins]

For questions about Jenkins, an open source automation server, and using Jenkins for topics such as building, testing, and deploying software, etc. For questions specifically about Jenkins Plugins use the jenkins-plugins tag.

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

How should a user test their changes before opening a pull request?

Scenario: (I think this is following the github workflow?) There is one repository, master. Release branches are branched every so often. Users create their own fork of the repository. They branch off ...
0
votes
0answers
26 views

how to create dynamic stages in jenkins pipeline

I want to use a python script as input to create stages in jenkins pipeline test.py {'job-name': 'Test1', 'action': 'a', 'targetname': 'x'} {'job-name': 'Test2', 'action': 'b', 'targetname': 'y'} {'...
0
votes
0answers
21 views

how to execute a python script in jenkins pipeline as a stage and use the output of python script to declare further stages in pipeline as next stage

I have written a python script which provides me a output like this as a dictionary, test.py: {'job-name': 'Test1', 'action': 'a', 'targetname': 'x'} {'job-name': 'Test2', 'action': 'b', 'targetname': ...
0
votes
0answers
21 views

Jenkins Gitlab integration Client error: Remote host terminated the handshake

I have installed Jenkins version 2.303.2 in RHEL and installed gitlab plugin in it. From the Jenkins server I can telnet to gitlab server but when I try to configure gitlab in Jenkins UI, it gives ...
0
votes
1answer
23 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. ...
1
vote
1answer
12 views

how to increase "Atom feed for all" default value

Inside any Jenkins job, I have the button "Atom feed for all" at the bottom of the page. It gives an XML with details about the last 10 builds. I need to increase it somehow to get more than ...
0
votes
1answer
22 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 ...
0
votes
1answer
30 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 ...
1
vote
0answers
23 views

Building a pipeline to recognize changes in a terraform template compared to the git commit before and having it apply changes using specified command

Looking to get pointed in the right direction: I am trying to build a pipeline that will recognize changes in a remote terraform template that will recognize changes compared to the previous git ...
-1
votes
1answer
35 views

how often Jenkins should be upgraded [closed]

Currently we have the version 2.200 installed and we want to upgrade it. I want to know what is the best way to do it. what are the possible flaws. and how often the jenkins should be upgraded. Thank ...
1
vote
1answer
54 views

How to get the classic Jenkins build status icons back?

From my POV the classic Jenkins build status icons were, and still are, a masterpiece of icon art: All the others weren't, and still aren't, bad either. (How is the saying? "If it ain't broke, ...
0
votes
1answer
24 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', ...
0
votes
1answer
38 views

How to exit a jenkins job if a script executing gets access denied?

I have written this script that performs db backup #!/bin/bash #For taking backup DIR=/media/storage/backup/db_backup/ DATESTAMP=$(date +%d-%m-%y-%H-%M) DB_USER=backup DB_PORT=$2 DB_PASS='secret' ...
0
votes
0answers
14 views

Why Jenkins Blue Ocean with inheritance Job does not log ? Yet logfile is created

I'm willing to switch to blue ocean however I can't get the pipeline logs to show in inheritance "classic" jobs (https://plugins.jenkins.io/project-inheritance/) : I see that freestyle jobs ...
1
vote
0answers
20 views

In Jenkins, what plugins and/or configurations should I use to promote/redeploy Docker images and Git branches

I have set up a Jenkins job using the multibranch plugin. Via my Jenkinsfile, Jenkins executes the following steps: Build: docker-compose build Test Push Git ref to internal Git repository Tag local ...
0
votes
0answers
15 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. ...
0
votes
0answers
43 views

how can I redirect Jenkins stage console log to a file

I have a situation when I have Jenkins log compiled from parallel stages creating an un readable log file. I am looking for a way to redirect stage log output to a file (per stage) so I can filter ...
0
votes
0answers
16 views

What is the best approarch for global variables in Jenkins?

I have a project with several pipelines, each one for one microservice and its 'dev' branch counterpart. I was wondering thares a way of declaring these variables globally in the Jenkins pipeline, so ...
1
vote
1answer
49 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
86 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
43 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
44 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
21 views

how good are azure containers as jenkins agents? [time of execution/stability/price]

I am migrating on-premise Jenkins to Azure Cloud. I use Jenkins to build software, build takes usually about 8 GB of RAM and uses both Windows and Linux VMs as nodes. What is better solution in Azure ...
1
vote
0answers
35 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....
3
votes
1answer
58 views

What challenges did you face once you gave devs access to Jenkins jobs?

I am a DevOps engineer at a medium-sized company. Our team is super busy and we have a lot on our plate. Recently we decided to see where we can improve our productivity. One of our main ...
1
vote
1answer
81 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 ...
1
vote
0answers
25 views

Jenkins - restrict which nodes can be selected by user when creating jobs (already tried Project-based Matrix Authorization Strategy + folder plugins)

I need to securize nodes of Jenkins and allow them to be used only by one user. I read existing question : "Jenkins - restrict which nodes can be selected by user when creating jobs" but ...
-1
votes
2answers
45 views

K8s with docker hub

I have configured jenkins with github.com. Jenkins notices if commit occurs and then jenkins make the docker image and upload the new image to docker hub. How can I make k8s listens to docker hub i.e. ...
0
votes
1answer
30 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
173 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
23 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
54 views

Automating deployment of microservices from start to finish

I'm currently part of a team that trains multiple pods of new hires. Each pod creates a client simulated project that involves the following steps: Creating kubernetes namespaces for each pod for ...
1
vote
1answer
94 views

How to safe restart Jenkins from OS command line

There is an existing question here on how to safely restart Jenkins: How to safe restart Jenkins? However, all the answers are either HTTP(s) options or using the jenkins-cli.jar CLI route. I want to ...
2
votes
1answer
68 views

Jenkins pipeline : How can I display a downstream / upstream relationship?

I have a pipeline that ends with a step which call build() to run another pipeline, not waiting for its end. Even when the downstream pipeline is finished, there is no downstream/upstream indication ...
1
vote
1answer
55 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 { ...
2
votes
1answer
46 views

How to do docker build image from dockerfile on Kubernetes 1.20

Kubernetes 1.20 moved from docker to CRI-O as container runtime. I have a scenario where my Jenkins run on kubernetes and does docker build my dockerfile .But the build breaks as docker daemon is not ...
1
vote
1answer
33 views

Jenkins JobDSL organizationFolder and ghprb - even possible?

I'm working on getting JobDSL working with organizationFolder (the seed job builds just fine), and ghprb. 'githubPullRequest' doesn't exist under JobDSL's organizationFolder/triggers section, but '...
-1
votes
1answer
21 views

choice parameter and extended choice parameters not working in Blue Oean interface in Jenkins

choice parameter and extended choice parameters not working in Blue Ocean interface in Jenkins. I have a huge list in the drop down menu. I wanted to have a drop down with filterable option or make it ...
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']) { ...
0
votes
1answer
48 views

Using a conditional environment{ } directive in Jenkinsfiles

My Jenkinsfiles use the environment{} directive. I've been trying to set a condition where I invoke different variables depending on the GIT branch being builded. I've tried something like e. g. : ...
1
vote
1answer
46 views

Modularizing CI/CD pipelines in Jenkins or in other tools?

I have the following case: There are a couple of repositories (well, two-digit number). Each of them has some sort of (declarative) Jenkins pipeline - it would be one of three types: run tests -> ...
1
vote
1answer
106 views

Blue ocean logging my step commands

using a minimal jenkinsfile as an example node("master") { stage("Test") { sh( label: "THIS SHOULD DISPLAY", script: "set -e; ...
0
votes
1answer
506 views

Jenkins: Dynamically git clone only the files required for a particular job from a monorepo

We have a huge ~20GB monorepo. For a particular Jenkins job, we do not need to clone the entire repo but only need a few sub-directories. The solution for this is of course git sparse checkout. ...
-1
votes
1answer
202 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 ...
2
votes
2answers
313 views

How many executors can I have for a Jenkins Windows build node?

I have set up Windows build nodes in awhile, but I do remember when I did I was only able to set 1 executor per node. Is this still true?
2
votes
1answer
93 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
166 views

Why is parameter not propagated to post-build parameterized build?

I'm trying to apply the guidance I recently read at how to trigger parameterized builds from a different build in Jenkins and https://plugins.jenkins.io/parameterized-trigger/ - but this doesn't seem ...
0
votes
1answer
2k 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
143 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
76 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 ...

1
2 3 4 5
12