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
2
votes
1answer
302 views

Bitbucket Pipeline & Jenkins & Yocto

I want to setup a CD system for a yocto project which is version controlled in a bitbucket repository. I want to write a bitbucket pipeline which triggers a jenkins job on a build server which starts ...
2
votes
2answers
1k views

How to pass a String parameter with spaces in Jenkins to environment variable

In jenkins Job, I am taking a String parameter as below: FoldersList = test1,test2,test3,Folder name1,Folder name2,Folder name3 when I pass this value to environment variable the jenkins job fails ...
1
vote
1answer
489 views

403 forbidden error on calling jenkins post api from python script

I am trying to build a python script that will build jobs externally but when I am executing it, throws 403 forbidden error for build jobs call other get APIs are working fine. Below is the python ...
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....
3
votes
1answer
2k views

how to run Docker/Jenkins behind a proxy

For the past few days I’ve been scratching my head trying to get the Jenkins docker image to work The issue appears to be a proxy issue. OS: Ubuntu 16.04 LTS Running behind work proxy ...
2
votes
1answer
84 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; ...
0
votes
1answer
124 views

How to customize a Jenkins job dsl method

I want to customize the powerShell() method in jobDSL a .groovy file with some job dsl defined jobs def betterPowerShell(def cmd) { powerShell("$cmd; exit \$LastExitCode") } Since I am out of ...
1
vote
2answers
112 views

How do we move to a modern CICD approach

This may also be a general pulse; but here lies the issue We use EKS, we have Jenkins, we have Ansible, we have Terraform, we have BitBucket; but none of these really form a pipeline and I'm stuck ...
1
vote
1answer
199 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
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
151 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
400 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('...
6
votes
2answers
607 views

How do we encrypt credentials in Jenkins console output

I can see credentials in Jenkins console output. How can we encrypt them? The "Mask Passwords plugin" is considered as not safe in my case.
1
vote
2answers
244 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 ...
4
votes
1answer
350 views

When does Jenkins clean up old builds?

I have existing Jenkins (2.90) jobs that are taking up disk space. When I enable the "Discard Old Builds" option I don't see any cleanup going on in the folder on the builds older than 7 days. When ...
1
vote
1answer
336 views

How to mark build success when one of the stages is aborted?

I've a pipeline with stages where one of the stage, intermittently takes longer than expectation and hence using timeout to abort it. But if the stage is aborted, build also marked as aborted. ...
2
votes
2answers
369 views

how to run multiple environments in single job in Jenkins

I have two environments - front-end and back-end. My front-end deployment has one job and my back-end deployment has another job. My team wants to deploy both front-end and back-end together. Can ...
2
votes
1answer
62 views

JAVA home give me wrong value on Jenkins node

I have Jenkins node with below configuration for JavaPath: /usr/java/jdk1.8.0_131/bin/java I wrote a simple Jenkins job which does the following: #!/bin/ksh echo "JAVA_HOME=${JAVA_HOME}" echo $PATH ...
0
votes
1answer
237 views

Using Jenkins declarative when conditions in scripted pipelines

Jenkins declarative pipelines offer very convenient when directive with conditions like changeset. Is is possible the this changeset and other when conditions in a scripted pipeline?
1
vote
1answer
19 views

Is it possible to set role in FreeIPA to use for applications as Jenkins, Github?

LDAP in FreeIPA, it can create groups, roles and set permissions. Applications such as Jenkins, Github also has roles feature. 2 questions: Can roles feature be used in every application? (At least ...
1
vote
2answers
2k views

Using Jenkins gitlab token to make an API call

From inside a Jenkins pipeline, I want to create a merge request on gitlab def toJson = { input -> groovy.json.JsonOutput.toJson(input) } def body = [ private_token: "...", ...
1
vote
1answer
104 views

Unable to Trigger Downstream Jenkins Job Based on the Promoted Builds Plugin

I have a request from a user who is currently using the Promoted Builds plugin for Jenkins. This user would like Job_B to be triggered when a build from Job_A has been promoted. In Manage Jenkins > ...
1
vote
2answers
3k views

Download an artifact from Nexus to Jenkins

I use ssh username and private key auth to download sources from Git, build the artifact and deploy it to my nginx server. Now I need to download an artifact as a zip file to Jenkins agent, prepare it ...
1
vote
1answer
27 views

Jenkins view is getting duplicate every container restart

I'm using Jenkins container and facing an issue that each container restart, the RunningJobs getting duplicate: Any idea what is the root cause and how can I avoid it?
1
vote
2answers
659 views

Jenkins - load scripted parameters from a SCM repo

I am using all kind of parameters like "Active Choice Parameter", "Active Choice Reactive Parameter", "Active Choice Reactive Reference Parameter" that have a lot of Groovy code within them. My ...
1
vote
2answers
475 views

Jenkins trigger build if shared library changes

I have Jenkins Pipeline job define in my git repo as. // File: deployment/jenkinsfiles/staging/Merge @Library("my_shared_lib") _ import com.company.myteam.Constants pipeline { agent { label "...
1
vote
1answer
217 views

Jenkins deploy static web with Apache2

I have a static website that I would like to deploy to my Apache2 server using Jenkins. I think of 2 solutions: Should I change the workspace dir of Jenkins to /var/www/? Or should I copy all files ...
0
votes
1answer
100 views

Jenkinsfile handling an expected job failure

I've got two types of failures to account for within a Jenkins job. The job genuinely failed The job failed because of a certain bit of info hasn't been published. Nothing is actually wrong here. ...
1
vote
1answer
39 views

Active directory integration issue with Jenkins

The active Directory login is not working for us on DMZ server since the request is going to multiple domain controllers servers (which cause us slowness in login- almost 10 minutes). how can we limit ...
2
votes
1answer
4k views

how to checkout only specific folder from git repo((monorepo)) and build

Hey folks I need some help on the jenkinsfile. Below is my usecase This is the strcuture of my GIT repo: root |->app1 | |->jenkinsfile | |->dockerfile1 |->app2 |->...
0
votes
1answer
50 views

windows 10 vs windows server 2016 as jenkins slave

The builds are running locally in my Windows 10 OS successfully. Can I run the same builds in Jenkins slave with Windows Server 2016? Will there be any issues during the build or should I go for ...
0
votes
1answer
81 views

Which Jenkins file is responsible for Enable cache setting

I want to know how can I modify the below setting from Jenkins server and not UI: http://XXXXX:YYYYY/configureSecurity/
1
vote
2answers
83 views

How to check minimum code coverage in pull request changes?

I want to force the developers to write unit tests for all new code they wrote. The code is written in python. I want to do it in the Jenkins pipeline. And here is a question. Is there any available ...
1
vote
1answer
31 views

Jenkins file that uses docker-compose gives ambigous error

I'm new to Jenkins and I want to automatize my current workflow a little bit. Right now I push it to the raspberry. Then via SSH I pull the changes, run docker-compose build and docker-compose up ...
0
votes
1answer
100 views

exponential backoff for git pushes?

We've got a ton of jobs in our Jenkins that all do git pushes, sometimes simultaneously. Unsurprisingly, if two jobs try to push at the same exact time, one will succeed while the other fails. My knee-...
1
vote
0answers
157 views

Connection refused when CURLing to docker container from within Jenkins pipeline

I have a situation with a CI Pipeline I'm trying to implement using Jenkins and Docker . Inside my pipeline I want to: download a python uwsgi web app, build it in a docker container, run it, then ...
1
vote
1answer
581 views

Jenkins-Deployment failure, Build successful

I have been trying to work on Jenkins and I'm able to Build the code but unable to deploy on to the Tomcat server. Have checked the users.xml file and Started by user nakul Running as SYSTEM ...
1
vote
1answer
1k views

Schedule Jenkins Job with Active choice Reactive parameters and Reactive reference parameters

I have created a Jenkins job which have Choice Parameters, Active Choice Parameters, Active choice reactive params and Reactive reference params. This job needs to be scheduled with parameters. As the ...
1
vote
1answer
55 views

Github Actions Last Build API

I'm looking for an option similar to Jenkins where I can view the last build, last successful build, last failed build, etc. with a simple api call. The Jenkins example would be: jenkins_url + /job/${...
1
vote
1answer
165 views

Minimal CMake Jenkinsfile failing

Why is this Jenkins build failing? How can I write a Jenkins file just to test the building of this simple project? DisplayImage.cpp #include <stdio.h> #include <opencv2/opencv.hpp> ...
1
vote
1answer
1k views

Running Jenkins in docker with custom uid / gid

I have the following Dockerfile: FROM jenkins/jenkins:latest I'm build a Jenkins container as follows: docker build -t my-jenkins --build-arg uid=1003 --build-arg gid=1003 . I then run the image ...
2
votes
1answer
306 views

How do i connect docker pipeline on jenkins to kubernetes cluster

I am trying to setup a pipeline on jenkins that uses docker containers to execute tasks like for example deploy an helm charts using a docker image with helm here is what my Jenkinsfile looks like ...
0
votes
1answer
1k views

Getting permission denied with docker pipeline on jenkins

I have jenkins deployed via helm charts on kubernetes cluster Now i want to be able to run helm to deploy helm charts applications on my kubernetes cluster and have the following in my jenkinsfile ...
1
vote
1answer
117 views

OpenShift fails to deploy jenkins - connection refused

I am using the GitHub project elio/openshift-vagrant. vagrant up and then the script oc-up.sh gives me a master and two nodes. Ansible provision runs without problems. After provision I can login to ...
0
votes
1answer
177 views

Mail logs with Jenkins

I am deploying my software on different OS ( Red hat & suse) and I need to know if my latest version of the software will work. In order to check if the installation works it's enough to check ...
2
votes
1answer
565 views

How to schedule a Jenkins Job dynamically based on the time value in database

I have a situation where there is a database in which a table consists of scheduled time to build. This schedule time to build may vary from day to day. Say for example, Today the entry in db is 09/...
1
vote
3answers
2k views

Unable to run `conda activate` from Jenkins pipeline

I'm running Conda 4.6.14 on Ubuntu 16.04. I thought about using virtual environments with Conda in my Jenkins pipelines that needed Ansible, by having all nodes use the same environment, ansible-env ...
1
vote
2answers
2k views

Jenkins Plugin Install Failed

I am trying to set up new Jenkins. When I download Suggested Plugins OR try to install any plugin I am getting below error. I am using Jenkins Latest Version 2.204.1. I have set up this on VM. I am ...
1
vote
1answer
45 views

nginx for dummies? How to enable Jenkins over https

I'm running Jenkins on an Ubuntu machine bare metal, and as I'm only experimenting and learning how the ops of it all works, I now want to learn how to enable https (with a nominally valid certificate ...

1 2
3
4 5
12