Questions tagged [jenkins-cli]

Jenkins has a built-in command line client that allows you to access Jenkins from a script or from your shell. This is convenient for automation of routine tasks, bulk updates, trouble diagnosis, and so on.

has a built-in command line client that allows you to access from a script or from your . This is convenient for automation of routine tasks, bulk updates, trouble diagnosis, and so on.

679 questions
7
votes
2 answers

How do I get a list of jobs with longest build time in Jenkins

I need to generate a weekly report on our Jenkins build cluster. One of the reports is to display a list of jobs that have the longest build time. The solution I can come up with is to parse the "Build history" page on each slave (also master) and…
Jifeng Zhang
  • 5,037
  • 4
  • 30
  • 43
7
votes
1 answer

Start jenkins in the background

I'm using .war file to run jenkins on my server. They say use java -jar jenkins.war (Source: https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins) to start the server. This starts the server and shows log on screen and it is…
Umakant Patil
  • 2,227
  • 6
  • 32
  • 58
6
votes
5 answers

Error in Jenkins Mac Catalina - cannot access parent directories: Operation not permitted

I updated my mac to catalina and i am starting to get this error. Before everything was working fine. I am trying to cd into the directory from my jenkins workspace and run my npm tests and i am getting the error below: shell-init: error retrieving…
cva6
  • 325
  • 7
  • 15
6
votes
1 answer

Jenkins configuration as code: programmatically reload configuration from file

How to reload Jenkins configuration as code file from within groovy script? (Equivalent of clicking on "Reload existing configuration")
6
votes
3 answers

Jenkins CLI : ERROR: anonymous is missing the Overall/Read permission

I'm stuck with this problem and I have no idea to solve it. I have written a Shell script which will invoke my job using Jenkins CLI by passing my private key.Jenkins version is 2.121.1 java -jar jenkins-cli.jar -s http://localhost:8080 -i…
user2439278
  • 1,222
  • 7
  • 41
  • 75
6
votes
3 answers

Jenkins Slave Self Register

I am creating a Jenkins master/slave cluster and I am having trouble finding a way to have new slaves auto register themselves with the master. My current set up is I run some Terraform scripts that will create the master and 5 slaves. Then I have…
aloisbarreras
  • 557
  • 6
  • 14
6
votes
1 answer

how to exclude the folder from aws s3 sync command

We have an aws s3 sync command that sync's the data from bitbucket to s3 via Jenkins execute shell. Below is the s3 bucket structure cdn-accountname > qa > sitename > cdn > img cdn-accountname > qa > sitename > cdn > css cdn-accountname > qa >…
MichealMills
  • 315
  • 5
  • 15
6
votes
1 answer

Jenkins (not admin) Users Password reset/Username change

I just added the Security to Jenkins. Jenkins’ own user database enabled Matrix based security configured Now i'm configuring and installing the Role matrix plugin. In case someone want to change his password he just have to login, click on this…
ivoruJavaBoy
  • 1,307
  • 2
  • 19
  • 39
6
votes
1 answer

How to get the status of a particular stage in a pipeline

How do we get the status of the preceding stage(s) in a Jenkins pipeline. For example: My example pipeline is as under: pipeline { agent { node { label 'master' customWorkspace "${env.JobPath}" …
Yash
  • 2,944
  • 7
  • 25
  • 43
6
votes
4 answers

java.io.IOException: No X-Jenkins-CLI2-Port (jenkins cli not working )

I'm trying to run the following command: java -jar jenkins-cli.jar -s http://jenkins_URL/ --username myusername --password mypassword help But I'm getting the error : java.io.IOException: No X-Jenkins-CLI2-Port among [null, X-Required-Permission,…
6
votes
4 answers

Updating Jira tickets from Jenkins workflow (jenkinsfile)

How can I update a jira issue from within a Jenkinsfile (jenkins-worflow/pipeline)? Is there a way I could use the Jira Issue Updater plugin as a step in the Jenkinsfile? I know I could use the Jira RestAPI, but I'm trying to figure out if I can…
portenez
  • 1,189
  • 1
  • 10
  • 19
6
votes
1 answer

Query for last successful build number in Jenkins with change

Example: 32 - fail 31 - stable no change (triggered by parent) 30 - stable with changes 29 - fail ... I want a query to return 30 So far what I got: To query the last stable build…
hello_harry
  • 1,265
  • 2
  • 14
  • 24
6
votes
1 answer

Java API for Jenkins

I am writing a Java application where I need to track the status of Jenkins build and execute few actions on build success and failure. I am quite new to Jenkins. Is there a Java api available to track the status of the build? Is it possible to…
Santhosh
  • 534
  • 9
  • 24
6
votes
1 answer

How to increase jenkins build number automatically?

How to increase jenkins build number automatically or by using shell script?? For now i am doing the same using configure option, and increasing manually. i want to do it automatically.
KP_JavaDev
  • 222
  • 2
  • 4
  • 11
5
votes
2 answers

Unable to skip Jenkins Build by SCM Skip Plugin

I am working on a pipeline script in Jenkins to build the project based on a commit message. From Jenkins' forum, I noticed that we can use SCM skip plugin. I installed the plugin and added the below stage as the forum suggests: scmSkip(deleteBuild:…
1 2
3
45 46