jenkins-cli

How do I know which stage of jenkins pipeline has failed

核能气质少年 提交于 2020-02-18 08:08:18
问题 In my Jenkins pipelines I generally use post declarative function to send me an email incase the pipeline has failed. A simple syntax of the post function is as under: post { failure { mail to: 'team@example.com', subject: "Failed Pipeline: ${currentBuild.fullDisplayName}", body: "Something is wrong with ${env.BUILD_URL}" } } In the above email, I also want to mention which stage (lets say the pipeline has 5 to 6 stages) of the pipeline has failed. How can I do that? Any help is much

Jenkins Slave Self Register

孤人 提交于 2020-01-30 06:01:32
问题 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 to log in to the master node and Manage Jenkins -> Manage Nodes -> New Node and manually create the number of nodes I want. Then I RDP into my slaves and run the command java -jar agent.jar -jnlpUrl http://yourserver:port/computer/agent-name/slave

Jenkins Slave Self Register

情到浓时终转凉″ 提交于 2020-01-30 06:00:05
问题 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 to log in to the master node and Manage Jenkins -> Manage Nodes -> New Node and manually create the number of nodes I want. Then I RDP into my slaves and run the command java -jar agent.jar -jnlpUrl http://yourserver:port/computer/agent-name/slave

Unable to install suggested plugins of jenkins on docker

眉间皱痕 提交于 2020-01-24 09:32:16
问题 I had launched jenkins through docker, it has been launched in administrator mode. After entering password when i selected to install suggested plugin it fails with most of the installation. Post that when i created jenkins user and navigated to jenkins home page it displays errors as shown in below screenshot. Installed docker and jenkins through below commands sudo yum install docker-ce systemctl start docker docker pull Jenkins docker run -p 8080:8080 jenkins Also when i go to manage

Unable to install suggested plugins of jenkins on docker

三世轮回 提交于 2020-01-24 09:32:06
问题 I had launched jenkins through docker, it has been launched in administrator mode. After entering password when i selected to install suggested plugin it fails with most of the installation. Post that when i created jenkins user and navigated to jenkins home page it displays errors as shown in below screenshot. Installed docker and jenkins through below commands sudo yum install docker-ce systemctl start docker docker pull Jenkins docker run -p 8080:8080 jenkins Also when i go to manage

Running a Jenkins job with a node parameter fails to mkdirs

浪尽此生 提交于 2020-01-15 11:47:08
问题 I have added a Android Node in Jenkins. Now I am trying to run a Job with the Node as parameter It fails to mkdirs in workspace If i remove the Node as parameter, the Job runs fine Plese find the screenshot for the Node I created. Log: - Loading node environment variables. Building remotely on Android in workspace /var/lib/jenkins/workspace/AndroidT [WS-CLEANUP] Deleting project workspace... java.io.IOException: Failed to mkdirs: /var/lib/jenkins/workspace/AndroidT at hudson.FilePath.mkdirs

Jenkins jasmine-node command not found

别等时光非礼了梦想. 提交于 2020-01-06 11:34:28
问题 I am trying to configure Jenkins to be used for my team which works on node.js projects. We used jasmine-node for most of our projects. I have a jenkins instance managed by another group in the org which recognizes node and npm. I ran 'npm install -g jasmine-node' as one of the Jenkins job and the coonsole output says it is successfull: Building on master in workspace C:\.jenkins\workspace\ttm-closr > git rev-parse --is-inside-work-tree Fetching changes from the remote Git repository > git

Jenkins not able to access java : localhost jenkins[807]: Starting Jenkins bash: /usr/bin/java: Permission denied

蓝咒 提交于 2020-01-05 07:02:08
问题 I have installed and configured jenkins on the centos 7.I have added valid java path i.e "/usr/bin/java" in the file /etc/init.d/jenkins . Below are the java path detils: lrwxrwxrwx. 1 root root 22 Dec 24 2015 java -> /etc/alternatives/java Now, on running "service jenkins start" command from root user , I am getting below error. ● jenkins.service - LSB: Jenkins Continuous Integration Server Loaded: loaded (/etc/rc.d/init.d/jenkins) Active: failed (Result: exit-code) since Wed 2016-07-13 18

Getting an IP Address through Jenkins REST API?

别说谁变了你拦得住时间么 提交于 2020-01-02 04:35:07
问题 I've been tasked with instituting some health checking on some Jenkins jobs. The idea is to get the job's status and an associated IP address through the Jenkins rest API, so I can use that information to interface with another restful API. I have created a groovy script that successfully parses through the Jenkins jobs and gets their status (whether or not they are running) but I have yet to find a way to associate these jobs with their IP addresses. Is there any way to get the IP address of

How to pass an array to a jenkins parameterized job via remote access api?

你说的曾经没有我的故事 提交于 2019-12-25 08:41:55
问题 I am trying to call a Jenkins parameterized job using curl command. I am following Remote API Jenkins. I have Active choice parameter plugin. One of the parameters of the job is an Active choice reactive parameter. Here is the screenshot of the job: I am using the following curl command to trigger it with parameter: curl -X POST http://localhost:8080/job/active-choice-test/buildWithParameters -u abhishek:token --data-urlencode json='{"parameter": [{"name":"state", "value":"Maharashtra"},{