java cli
Hi, In my Java program I am using cli.execute to start a job in Jenkins but I have to wait for the job to complete. Is there a way to start a job asynchronously and in another part of my code (e.g. a different thread) wait for the reply and capture the output. Does anyone have any example code for this ? Many thanks.
Re: Hudson to Jenkins migration
I've read on the Jenkins site that I can replace the hudson.war file with the jenkins.war file by backing up the hudson.war file and renaming the jenkins.war file to hudson.war. If I use a 1.3x jenkins.war file which is compatible with hudson 2.2.1 config format and after change over upgrade to latest jenkins version Does this make sense? If I use the .war file rename how will jenkins know that it should replace the jenkins.war file (renamed to hudson.war)? Which 1.3x version should I start with for the migration? I can't seem to find the .deb installers for anything earlier than the latest. The archives contain just the .war files. Or should I use an earlier jenkins.war file, create a totally separate install and migrate over job by job and run in parallel until I know all is okay? Suggestions? Thank you. -- View this message in context: http://jenkins.361315.n4.nabble.com/Hudson-to-Jenkins-migration-tp4649322p4649431.html Sent from the Jenkins users mailing list archive at Nabble.com.
RE: Hudson to Jenkins migration
I think you misunderstood what I meant. After the split if Jenkins and Hudson, which was around 1.390 or something like that, Hudson changed its format for storing configuration in the XML. This does not mean that Jenkins 1.390 is compatible with current Hudson XML, it means that Hudson's file format changed and is no longer compatible with Jenkins XML format. If you were upgrading from Hudson 1.39x, before they changed formats, then you would have no issue upgrading. Sent from my Windows Phone From: Stuart Lorber Sent: 12/19/2012 7:14 AM To: jenkinsci-users@googlegroups.com Subject: Re: Hudson to Jenkins migration I've read on the Jenkins site that I can replace the hudson.war file with the jenkins.war file by backing up the hudson.war file and renaming the jenkins.war file to hudson.war. If I use a 1.3x jenkins.war file which is compatible with hudson 2.2.1 config format and after change over upgrade to latest jenkins version Does this make sense? If I use the .war file rename how will jenkins know that it should replace the jenkins.war file (renamed to hudson.war)? Which 1.3x version should I start with for the migration? I can't seem to find the .deb installers for anything earlier than the latest. The archives contain just the .war files. Or should I use an earlier jenkins.war file, create a totally separate install and migrate over job by job and run in parallel until I know all is okay? Suggestions? Thank you. -- View this message in context: http://jenkins.361315.n4.nabble.com/Hudson-to-Jenkins-migration-tp4649322p4649431.html Sent from the Jenkins users mailing list archive at Nabble.com.
Wrong E-Mail-Address from Mercurial commit information
Hi there! We have the following problem: for a job the option e-mail notifications to individuals who broke the build is activated. Our SCM is Mercurial/Kiln. Now it seems when sending out the mails the commit information from Mercurial is parsed. The result looks like that: Firstname Lastname _Firstname.Lastname@my-company.de_ In the Mercurial.ini the user Information is given as Firstname Lastname firstname.lastn...@my-company.de Any chance to get that working without changing the username to the plain e-mail address? Can we set the address in the user settings of the autogenerated SCM user? Or is that one overwritten on each checkout? Kind regards, Andreas Schilling CAE Processes Data Management --- Dipl. Inf. Andreas Schilling Senior Software Architect TWT GmbH Science Innovation Bernhäuser Str. 40 - 42 73765 Neuhausen Tel: +49 - 7158 - 17 15 - 673 E-Mail: andreas.schill...@twt-gmbh.de www.twt-gmbh.de Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.) Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778 Umsatzsteuer: ID-Nr.: DE147841145
Failed to restore jenkins from backup
Hi, I loosed my integration plateform but not Jenkins content and jobs, my jenkins/1.489/var/lib/jenkins directory is safe ! So to restore jenkins from backup, when i replace this folder var/lib/jenkins by the old one who contains my jobs..etc , and starting jenkins /etc/init.d/jenkins start i cannot join it ! i have an HTTP 404 ERROR See joined jenkins log file. tks for help i'm stuck **Running from: /pic/logiciel/jenkins/1.489/usr/lib/jenkins/jenkins.war webroot: System.getProperty(JENKINS_HOME) 19 déc. 2012 16:21:21 winstone.Logger logInternal INFO: Beginning extraction from war file 19 déc. 2012 16:21:21 winstone.Logger logInternal SEVERE: Error initializing web application: prefix [/jenkins] Throwable occurred: java.io.FileNotFoundException: /pic/dev/jenkins/vcur/var/lib/jenkins/war/.timestamp (Permission non accordée) at java.io.FileOutputStream.init(FileOutputStream.java:190) at java.io.FileOutputStream.init(FileOutputStream.java:142) at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:278) at winstone.HostConfiguration.init(HostConfiguration.java:71) at winstone.HostGroup.initHost(HostGroup.java:87) at winstone.HostGroup.init(HostGroup.java:47) at winstone.Launcher.init(Launcher.java:177) at winstone.Launcher.main(Launcher.java:384) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at Main._main(Main.java:273) at Main.main(Main.java:98) 19 déc. 2012 16:21:21 winstone.Logger logInternal INFO: HTTP Listener started: port=8080 19 déc. 2012 16:21:21 winstone.Logger logInternal INFO: AJP13 Listener started: port=8009 19 déc. 2012 16:21:21 winstone.Logger logInternal INFO: Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Re: Failed to restore jenkins from backup
On Wed, Dec 19, 2012 at 9:25 AM, @tiyou youssef.a...@gmail.com wrote: Hi, I loosed my integration plateform but not Jenkins content and jobs, my jenkins/1.489/var/lib/jenkins directory is safe ! So to restore jenkins from backup, when i replace this folder var/lib/jenkins by the old one who contains my jobs..etc , and starting jenkins /etc/init.d/jenkins start i cannot join it ! i have an HTTP 404 ERROR See joined jenkins log file. tks for help i'm stuck Throwable occurred: java.io.FileNotFoundException: /pic/dev/jenkins/vcur/var/lib/jenkins/war/.timestamp (Permission non accordée) Is the directory and contents owned by jenkins with the correct permissions after the restore? -- Les Mikesell lesmikes...@gmail.com
Re: A quick question about security features and email notifications
bump On Monday, December 17, 2012 9:44:55 AM UTC-8, Andrew Bayless wrote: Hello, I had a quick question, Is it possible to configure Jenkins to send email notifications to Administrators and/or users if any system-wide configurations or job configuration settings are changed by someone other than the administrator or creator/owner of a job ? Thanks, Andrew
Need help with parameter passing (want to pass both downstream and upstream)
Hi, I have three jobs. A invokes B, waits for it to complete, and then invokes C. B gets some data dynamically. This needs to be given to C. (The real names for these jobs are Monitor, Deploy, and Test; we're building a deployment pipeline, post-build.) Job B gets some new data, in our case an IP address. This needs to be sent to C so that it can perform its tests on the right deployment. One way to do this is using the Parameterized Trigger Plugin, defining A to invoke B, and B to invoke C. However, we want to configure it conceptually with a master job invoking each downstream job, so that e.g. one could invoke B by itself, without it requiring running C after it runs (e.g., for debugging purposes). We currently have a workaround where A creates a unique network folder, passing that as a parameter to B and C; when B completes, it writes the IP address to a file at the network location, and then when C starts, it reads that file from there. However, I'd prefer to not depend on an external network resource if I can help it. Is there a method to have B return data to A which can then be passed to C as normal Jenkins parameters? Thanks, Ken
Re: Cygpath Cygwin Git
Xavier that was the solution. Thank you. On Tuesday, December 4, 2012 5:25:05 PM UTC-6, Xavier Nodet wrote: Do you have the Cygwin DLLs in your path? They need to be available to the program, and they will be looked for by the system in the path or in the location of the program you run. When you run a program from .../cygwin/bin without the path being set, it's fine because the DLLs are at the same place, but here you try to run git from .../cygwin/usr/local/bin, a location that doesn't have the DLLs... Le mercredi 28 novembre 2012, Ryan Lovelett a écrit : It returns the same status code. On Wednesday, November 28, 2012 4:23:21 PM UTC-6, Urivan Flores wrote: Maybe too obvious but did you try to double backslash? Otherwise it will take it as a scape sequences. Regards, -Urivan On Nov 28, 2012 2:00 PM, Ryan Lovelett ryan.l...@gmail.com wrote: I would have thought that through the use of the Cygpath plugin my Windows system I would be able to use the Cygwin installed git. I know that the git executable is installed: [Ryan@Windows /cygdrive/c/Projects] $ cygpath -C ANSI -w `which git` C:\cygwin\usr\local\bin\git I have provided the Tool Location for the Windows node: /user/local/bin/git This provides an error. I have the full error if it is relavant. But I think these two errors say everything necessary. Error trying to determine the git version: Error performing command: /user/local/bin/git --version ... Caused by: java.io.IOException: Cannot run program /user/local/bin/git: CreateProcess error=2, The system cannot find the file specified So I said to heck with Cygpath; I will just provide the full executable from Windows (e.g., C:\cygwin\usr\local\bin\git) in the Tool Location for the Windows node. Which led to this error Error trying to determine the git version: Command C:\cygwin\usr\local\bin\git --version returned status code -1073741515: ... Caused by: hudson.plugins.git.**GitException: Command C:\cygwin\usr\local\bin\git clone -o origin g...@our-git-repo.com:testing. **git C:\jenkins\workspace\Git Clone\label\Windows returned status code -1073741515: These errors have to do with the Cygwin environment not being loaded. I am not sure what to do about that. Suggestions? -- Xavier Nodet
Re: Need help with parameter passing (want to pass both downstream and upstream)
Haev a look at the Multi-Job plugin. This is essentially what we do as well, and use the Multi-Job plugin Job as the Master . ... Mgimza On Wed, Dec 19, 2012 at 2:28 PM, Ken Beal kenbealimpriv...@gmail.comwrote: Hi,** ** ** I have three jobs. A invokes B, waits for it to complete, and then invokes C. B gets some data dynamically. This needs to be given to C.*** * ** ** (The real names for these jobs are Monitor, Deploy, and Test; we're building a deployment pipeline, post-build.) ** ** Job B gets some new data, in our case an IP address. This needs to be sent to C so that it can perform its tests on the right deployment. ** ** ** ** One way to do this is using the Parameterized Trigger Plugin, defining A to invoke B, and B to invoke C. However, we want to configure it conceptually with a master job invoking each downstream job, so that e.g. one could invoke B by itself, without it requiring running C after it runs (e.g., for debugging purposes). ** ** We currently have a workaround where A creates a unique network folder, passing that as a parameter to B and C; when B completes, it writes the IP address to a file at the network location, and then when C starts, it reads that file from there. ** ** However, I'd prefer to not depend on an external network resource if I can help it. Is there a method to have B return data to A which can then be passed to C as normal Jenkins parameters? ** ** Thanks, Ken
Re: Need help with parameter passing (want to pass both downstream and upstream)
Package up the file as an artifact? Have Job A retrieve it and then pass it to C? If that seems like too much then just copy the file from B's workspace into A' then inject as an envar. My approach is to use the BuildFlow plugin. Much greater flexibility as far as conditional job execution. It even offers try/catch like functionality. -b On Wednesday, December 19, 2012 2:28:10 PM UTC-5, Ken Beal wrote: Hi, I have three jobs. A invokes B, waits for it to complete, and then invokes C. B gets some data dynamically. This needs to be given to C. (The real names for these jobs are Monitor, Deploy, and Test; we're building a deployment pipeline, post-build.) Job B gets some new data, in our case an IP address. This needs to be sent to C so that it can perform its tests on the right deployment. One way to do this is using the Parameterized Trigger Plugin, defining A to invoke B, and B to invoke C. However, we want to configure it conceptually with a master job invoking each downstream job, so that e.g. one could invoke B by itself, without it requiring running C after it runs (e.g., for debugging purposes). We currently have a workaround where A creates a unique network folder, passing that as a parameter to B and C; when B completes, it writes the IP address to a file at the network location, and then when C starts, it reads that file from there. However, I'd prefer to not depend on an external network resource if I can help it. Is there a method to have B return data to A which can then be passed to C as normal Jenkins parameters? Thanks, Ken