jenkins-cli

Parse HTML file using Python without external module

允我心安 提交于 2019-12-14 02:50:31
问题 I am trying to Parse a html file using Python without using any external module. The reason is I am triggering a jenkins job and running into some import issues with lxml and BeautifulSoup (tried resolving it and I think somewhere I am doing over engineering to get my stuff done) Input : <tr class="test"> <td class="test"> <a href="a.html">BA</a> </td> <td class="duration"> 0.000s </td> <td class="zero number">0</td> <td class="zero number">0</td> <td class="zero number">0</td> <td class=

How to check disabled jobs with Jenkins server?

假如想象 提交于 2019-12-13 14:17:50
问题 I am using Jenkins to run tests on my servers. So I created a job for each server and I run the test on the job, and I would like to know with simple bash script if my specific job is disabled/enabled? I can ssh to Jenkins server and I want to run that script from there how I can do that? 回答1: See http://<Your Jenkins>/api and http://<Your Jenkins>/api/xml : <hudson> ... <job> <name>...your job name...</name> ... <color>disabled</color> </job> ... For a job's description see http://<Your

How to increase jenkins build number automatically?

眉间皱痕 提交于 2019-12-12 08:12:25
问题 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. 回答1: What you are asking for (i.e. keeping the build number same between multiple jobs) is simply impossible in Jenkins. This is done by design (as noted by Jenkins creator himself): "[JENKINS] assumes that the build number is unique and monotonic.". You can change it to a higher value, but changing it to same

how to configure job in jekins if first project is build successful then trigger another project and so on with “Multi-configuration project” job

孤街浪徒 提交于 2019-12-11 12:42:06
问题 I want to trigger project in jekins if first project is build successful then trigger another project and so on.. how can do it. I hava project1 , project2, and project3, project4, project5 so on. here I am configuring "Multi-configuration project" job. for exp:- project1->success then trigger project2->success then trigger project3 if any stage failed then doesn't trigger other project.This is "Multi-configuration project" job, because this single job, I am trigger on multiple slaves

how do i get the latest build in jenkns with a specified parameter

徘徊边缘 提交于 2019-12-11 04:53:51
问题 My goal is to get the latest Jenkins job (jobname hanna) with a specific parameter. The only reason why I'm doing this is Jenkins do not return a build number when I trigger from my script, so I have to pass in a parameter, but I have to be able to query against that parameter later. Rigth now I have this, which doesn't return the build ID: curl -X POST 'http://server:8080/api/xml?tree=jobs[name,builds[actions[parameters[name,value]]]]&xpath=/hudson/job[build/action/parameter[name="snapshot"]

jenkins-cli commands returning connect timed out

蓝咒 提交于 2019-12-11 03:45:47
问题 Any suggestions/fixes for this jenkins-cli error? I have a deploy job, which is parameterized (test, stage, prod). So, whenever there is a deploy to the "staging" environment, i am trying to make Jenkins slaves execute a groovy script. Trying to test the jenkins-cli.jar, i got this error: [jenkins@ip-10-0-0-92 scripts]$ java -jar jenkins-cli.jar -s https://my_jenkins_URL/ help Exception in thread "main" java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl

AUTO IT EXE to be executed through Jenkins CI Tool

半世苍凉 提交于 2019-12-10 22:56:44
问题 I am using CI Jenkins Tool and trying to execute an AUTO IT Exe file. I tried through Jenkins, with the following options, but nothing is working out . Execute command line arguments batch file ant file Windows runner plugin 回答1: Running AutoIt via Jenkins on a slave will depend on how the slave is launched. Since you're using AutoIt, you're using Windows. The Windows slave can NOT be started via SSH or via Windows Service. You MUST use JNLP Web State and you MUST start it in a particular way

jenkins cli command gives error java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A

Deadly 提交于 2019-12-10 14:09:55
问题 I am trying to execute jenkins cli command java -jar /home/jenkins/jenkins-cli.jar -s http://jenkins.server.com/ version --username jenkins --password jenkins Getting following error Aug 05, 2015 6:01:02 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run SEVERE: I/O error in channel Chunked connection to http://jenkins.server.com/cli java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java

How to change a Git URL in all Jenkins jobs

耗尽温柔 提交于 2019-12-10 10:11:52
问题 I have more than 100 jobs in Jenkins and I have to change a Git URL in each and every job since we changed the git server. I must traverse each job and change the Git URL. Can anyone help me with a groovy script? I was able to traverse each job, but not able to get the Git URL or change it: import hudson.plugins.emailext.* import hudson.model.* import hudson.maven.* import hudson.maven.reporters.* import hudson.tasks.* // For each project for(item in Hudson.instance.items) { println("JOB : "

How to have jenkins-cli.jar work with Jenkins running https?

杀马特。学长 韩版系。学妹 提交于 2019-12-09 23:16:36
问题 Has anyone successfully run Jenkins-cli.jar for https protocol? I kept getting connection error from client side to Jenkins on https. Could anyone help me on this? My sincere appreciation. -> java -Djavax.net.ssl.trustStore=/tmp/jenkins2/jenkinskeystore.jks -Djavax.net.ssl.trustStorePassword=<password> -jar jenkins-cli.jar -s https://jenkins2.eng.proofpoint.com:8443 help Exception in thread "main" java.io.IOException: Failed to connect to https://jenkins2.eng.proofpoint.com:8443/ at hudson