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

jenkins declarative pipe - withCredentials does not work

I am using git branch: '<branch>' , credentialsId: 'ID_JENKINS' , url:<tfs_server> to clone a repository, which works without problems. But when I would like to do the same with ...
2
votes
1answer
10 views

Control GKE CICD from a Jenkins in a lab with private network?

For a test purpose I need to use my locally provisioned Jenkins with Vagrant in order to connect to GKE and use pods to build. Is that possible, because from what I read K8s will need access to ...
0
votes
2answers
30 views

Jenkins - docker login doesn't seem to persist: docker pull won't work but docker-compose can pull without problems

I am setting up a new Jenkins as our old one is based on a deprecated base image. Dockerfile is: FROM jenkins/jenkins:lts-centos7 USER root RUN yum -y install docker \ && yum clean all ...
5
votes
1answer
35 views

How to have jenkins add a review to a pull request

I have a Jenkins instance, with credentials for a "robot" github account, which we use to interact with the GitHub API as a team. Typically, jobs are defined as declarative pipelines. I am ...
1
vote
1answer
46 views

What's in THIS environment?

We work on multiple java web projects going on at the same time and those are all being tested on several different QA environments. I'd like to show on our support portal what projects are in what ...
0
votes
0answers
10 views

Automation for Harbor certificate renewal and installation process:

Can anyone please suggest options for the process to automate kubernetes harbor certificate Renewal and installation. I have an option with cert manager but i need to hv a job running on Jenkins for ...
0
votes
0answers
9 views

Deploy .NET application from Jenkins on Linux to MS Azure Web service

We have .NET application which deployed to Azure Web services. Now is time to create deployment pipeline for it. And want to know what is high level plan how .NET application can be deployed to Azure ...
1
vote
1answer
20 views

How to revert jenkins Safe restart?

Jenkins was having issues and I safe rebooted it in order to solve the issue but the issue got solved the reboot. Some jobs have ours to run so is there way to cancel the reboot?
2
votes
0answers
24 views

yaml files in jenkins pipeline

Just started out working on jenkins, among other things I'm trying to understand the role of yaml in pipelines. I understand that pipelines or declarative pipeline (do other type of pipelines exist in ...
0
votes
0answers
6 views

jenkins : pipeline to build multiple typescript + react project in the same repo?

Completely new to jenkins and jenkins pipelines and I'm struggling at understanding how to build/package/unit test multiple typescript + react applications all contained in the same repository ...
0
votes
0answers
11 views

How to enable timeout in pipeline based on a condition?

I have a Jenkins pipeline with the following stage - stage('Test') { options { timeout(time: 5, unit: 'MINUTES') } steps { script { ...
1
vote
2answers
38 views

How to determine whether the Jenkins build was started by a user or the scheduler?

I have a Jenkins job which does some unit-testing for some code. It can be started in two possible ways: By the scheduler - it polls the Perforce server, and starts the job when it detects a code ...
2
votes
1answer
53 views

Jenkins cron works only for the 1st line

I'm trying to use Jenkins to run a small monitoring script every minute on two separate ECS clusters. In the text box that opens when you enable "Build periodically with parameters" I wrote: ...
0
votes
0answers
17 views

How to edit xml files through Jenkins pipeline?

I've to update xml file as a part of pipeline. From following, I've to replace value from true to false <bean id="SecurityFilter" class="xxx"> <property name="...
1
vote
1answer
21 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 - ...
0
votes
0answers
11 views

Is there any way/API available to check Jenkins is in quiet mode?

Is there any way/API available to check Jenkins is in quiet mode ?
0
votes
0answers
3 views

How to get http status code for Jenkins quiet down state

I want to get the http status code when Jenkins is in quiet down mode. Is there any way?
0
votes
1answer
24 views

How do I load a Jenkins Shared Library in a Jenkins Job DSL seed?

I have a seed job using the plugin Jenkins Job DSL. I also have a shared library. I have tried using the @Library annotation to load the script and the library method. It cannot find the annotation ...
1
vote
1answer
37 views

How to determine if a Jenkins build is triggered by a Pull Request merged to Master

I think i've scoured every post on this topic but haven't found my specific scenario. (Maybe that means I'm building the wrong thing OR i've built something unique and new? The former is far more ...
1
vote
1answer
31 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 ...
1
vote
0answers
15 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 { ...
0
votes
0answers
8 views

Avoid RejectedAccessException when adding key,val to environment using env[key]=val in Jenkins Declarative pipeline

Adding key,val to environment using below: pipeline { stages { stage("Shallow clone or fetch"){ steps { script { readProperties(file: "f....
2
votes
1answer
52 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 ...
1
vote
0answers
13 views

How I can trigger CRON with parameters without using following plugin “parameterized-scheduler-plugin”

Actually, I do not have Jenkins admin right and instead of requesting admin to install "parameterized-scheduler-plugin", are there any other plugin-less alternatives.
0
votes
0answers
11 views

ec2fleet plugin to launch slave nodes in jenkins

I have a requirement to create && terminate the slave machines from my Jenkins master. For this i am using AWS spot instances and EC2 fleet plugin in Jenkins. I am able to launch the spot ...
0
votes
0answers
11 views

Search in json file nested value

There is a file with such a data structure. How can I find id with groovy script using that matches the search object = prod OR object = prod. And return matches id in result. [ { "id": "...
2
votes
1answer
22 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 ...
1
vote
1answer
32 views

How do I setup ssh from jenkinsci/blueocean docker to remote?

I am running jenkinsci/blueocean docker locally as per the instructions of running jenkins using a docker on jenkins.io. Everything seems to be working correctly but when I docker exec into the docker,...
2
votes
1answer
38 views

Jenkins Docker Behind Reverse Proxy Adds “:80” to the URL

The Jenkins container redirects to URL:80, which is causing an error. When I remove the :80, everything is working as it should. I have tried the proxy with a simple web app and there were no issues. ...
4
votes
0answers
45 views

How can I unify my distributed build environments using Jenkins and Docker?

I have recently taken over the CI management for a medium-sized team of developers. Currently, we have one Jenkins server instance as well as six other instances of Jenkins agents to build upon. We ...
2
votes
1answer
38 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
1answer
41 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
0answers
20 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
32 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
134 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
166 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
29 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
29 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
89 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 ...
0
votes
0answers
8 views

Does the organizationFolder job dsl config support custom scripts?

https://jenkinsci.github.io/job-dsl-plugin/#path/organizationFolder I have jenkins enterprise and can use custom scripts and marker files: https://docs.cloudbees.com/docs/admin-resources/latest/...
0
votes
1answer
26 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 ...
0
votes
0answers
13 views

Get Perforce credential info (other than username and password) in Jenkins Pipeline script

I have a Jenkins Pipeline that has been using a Global Perforce Password Credential to perform several P4 commands. Up till now, I need to use and extract the user and password from this credential, ...
3
votes
1answer
30 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
24 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
0answers
20 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
130 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.
0
votes
0answers
10 views

How to create an object from a Jenkins Shared Library sub-class

I'm reworking our shared libraries and trying to take a more OOP approach. I'm able to create a class and instantiate an object from that class, but I'm not able to do the same with a subclass. Here ...
1
vote
2answers
35 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 ...
0
votes
0answers
10 views

Jenkins pipeline does not proceed even if Selenium execution finishes

I have a pipeline with stage for Selenium execution where execution of Selenium tests takes around 5 hours. In 'Selenium Execution' stage, I've code to execute Selenium tests then taking backup of ...
0
votes
0answers
8 views

How do I see what Jenkins Enterprise team a user is in from inside a pipeline?

I can see who the current user is like this: def build = currentBuild.rawBuild def cause = build.getCause(hudson.model.Cause.UserIdCause.class) def user = cause?.getUserName() But I use Jenkins ...

1
2 3 4 5
11