Re: pipeline groovy - can somebody please explain why variable value passing is working like this?

2016-11-18 Thread Thomas Keller
I'm just interested in this thread, so I'm subscribing by answering. Sorry for 
the confusion :) 

Am 14. November 2016 12:15:16 MEZ, schrieb Jonathan Hodgson 
<j.r.hodg...@gmail.com>:
>I'm sorry, but am I supposed to know what that means?
>
>On Monday, November 14, 2016 at 10:25:12 AM UTC, Thomas Keller wrote:
>>
>> /sub
>
>-- 
>You received this message because you are subscribed to a topic in the
>Google Groups "Jenkins Users" group.
>To unsubscribe from this topic, visit
>https://groups.google.com/d/topic/jenkinsci-users/j7lvrd4UqO8/unsubscribe.
>To unsubscribe from this group and all its topics, send an email to
>jenkinsci-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/jenkinsci-users/d1b04553-3549-4312-b71f-680a8183e312%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
Sent by my Droid

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/D6DE232E-EE9E-4355-BAEB-F867E20E27FC%40thomaskeller.biz.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline trigger

2016-11-15 Thread Thomas Keller
Ok, I figured it out myself. Several issues on my side:

1) In order to get the upstream trigger set up, the dependent project needs 
to be run at least once, otherwise Jenkins obviously does not know anything 
about the trigger in first place.
2) Absolute project references of course need to start with a slash, i.e. 
/repos/barrepo/master
3) If relative project references are used, you need to remember that - by 
default - the trigger code resolves these references relative to the 
_parent_ project of the build. So if you have foorepo/master and 
barrepo/master, then you need to use "../barrepo/master", and not 
"../../barrepo/master" or anything alike.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/521d11dd-1075-4965-834c-b077b70933a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Multiproject repository

2016-11-15 Thread Thomas Keller
Multibranch pipelines are really only suitable for single-project 
multi-branch repos. The farest I got with a multi-project setup was using 
the Jenkins Repo Plugin (for the Google Repo Tool), but this would reverse 
the use case you're looking for: It pings all subprojects / subrepos and 
kicks off a build if any of those changed; you'd then still have to figure 
out manually what exactly would need to be build once your build has been 
kicked off.

I however suspect you could achieve this by remembering the last revision a 
specific subtree / repo was changed yourself (git log -1 path/to/subtree).

Am Montag, 14. November 2016 12:18:06 UTC+1 schrieb Sverre Moe:
>
> I need some help brainstorming a solution for multiproject repositories.
> Pipeline building a repository that contains several delivery projects.
>
> The root of the repository contains several delivery projects.
> - delivery-project
>   - delivery1
> - CMakeList.txt
> - delivery-project-delivery1.spec
> - src
>   - delivery2
> - CMakeList.txt
> - delivery-project-delivery2.spec
>   - delivery3
> - CMakeList.txt
> - delivery-project-delivery3.spec
> - src
>
> I could keep one Jenkinsfile on the root. Then iterate through all 
> directories and build each delivery.
> However when there is an SCM change in only one of the deliveries I only 
> want that one to be built.
> This could be solved if I could determine which directory has been 
> changed. Something like this (ignore closure which doesn't work in 
> Pipeline):
> changedDirectories.each { directory ->
>   dir(directory) {
>   doBuild()
>   }
> }
> Though I'm not sure how to get the SCM changes to determine this.
>
> Considering this delivery git repository will only have a master branch, a 
> Multibranch Pipeline project is not necessary, and a standard Pipeline job 
> would suffice.
>
> I could also create a Folder job for delivery-project, and one Pipeline 
> job for each delivery. Each subproject could contain its own Jenkinsfile 
> which would be specified in the configuration in Script Path as 
> delivery1/Jenkinsfile. However when a new delivery project is added to the 
> repository it would require me to manually add a new Pipeline job for it.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d5abe033-2f3b-4b79-a55c-d97f59e78260%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline groovy - can somebody please explain why variable value passing is working like this?

2016-11-14 Thread Thomas Keller
/sub

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1c095dc2-2586-43aa-a006-e9991f85c044%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting "java.io.NotSerializableException" exception in Jenkins pipeline, groovy.

2016-11-14 Thread Thomas Keller

IIRC objects used in pipelines need to be able to get serialized, because 
the build should be pausable and resumable at any time. Try to refactor the 
AntBuilder object creation and call into a groovy method and annotate this 
method with @NonCPS

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/470eba97-6898-49e8-b273-214bb3cfc1aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline trigger

2016-11-14 Thread Thomas Keller
Has anybody an idea?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9fee361d-574f-4eda-b117-9a7d21c82d6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline trigger

2016-11-10 Thread Thomas Keller
*bump*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/32f57b52-f8cb-4d72-8bd4-840603e73f02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Multibranch Pipeline trigger

2016-11-08 Thread Thomas Keller
Hey all!

I have multiple library projects that I build as multibranch pipelines. 
Naturally these library projects have dependencies and usually fetch these 
dependencies as a SNAPSHOT artifact from a previous build of the other 
library.

For the case where a such a dependency gets a change, I want to trigger a 
new build for all dependent library builds. These are my Jenkinsfile's for 
the two repos:


* in foo.git/Jenkinsfile


#!/usr/bin/env groovy

node {
stage('Test') {
checkout scm
sh "( sleep 5 && echo foo )"
}
}


* in bar.git/Jenkinsfile:

#!/usr/bin/env groovy

properties([ 
pipelineTriggers([ 
upstream( 
threshold: hudson.model.Result.SUCCESS, 
upstreamProjects: 'repos/foo/master' 
) 
]) 
]) 

node { 
stage('Test') { 
checkout scm 
sh "( sleep 5 && echo bar )" 
} 
}


Both Jenkins projects are saved underneath the directory "repos". Now I 
tried several versions how to reference "upstreamProjects", with relative 
paths "../../foo/master", "../foo/master" or simply "foo/master", or with 
the absolute path like above, but all without success: the "bar.git" 
project is just never triggered.


What am I doing wrong? Is this even a supported use case and if not, what 
are my alternatives given the above setup?


Thanks in advance,

Thomas.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6fc22699-13bc-4814-a49d-f8fef30fd206%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Automated install of JDK doesn't seem to work on a Mac

2013-11-08 Thread Thomas Keller
Hi,
Following the game-of-life tutorial setup description I was confused. I 
finally figured out you don't want Jenkins to install Maven or JDK if you 
have the OS X developer tools installed. Just check java --version and mvn 
--version for the home directory and put that into the appropriate HOME 
field in your configuration.
cheers,
pdx-tom

On Friday, December 30, 2011 2:48:52 AM UTC-8, sweeney wrote:

 Hi, 

 we recently added a couple of new nodes to our Jenkins cluster; a 64- 
 bit W2K8 box and a Mac mini server, in addition to the CentOS master 
 and four W2K8 32-bit blades.  Up to now we have been managing the 
 development build stack manually on the existing nodes, but as our 
 environment is becoming more heterogenous, I thought I'd try the 
 automatic tool install feature to see if that would simplify 
 administration of the cluster.  I've had mixed results.  Ant downloads 
 and installs fine everywhere, so the basic mechanism seems to be 
 sound.  However, I've not had so much luck with the JDK.  It downloads 
 and installs fine on CentOS and W2K8 32-bit with UAC disabled.  On the 
 64-bit node, UAC is still enabled, and the install fails: 

 Building remotely on hudson3 
 Installing JDK jdk-6u29-oth-JPR 
 Downloading JDK from 
 http://download.oracle.com/otn/java/jdk/6u29-b11/jdk-6u29-windows-x64.exe 
 Downloading 70687000bytes 
 Installing S:\Hudson\tools\jdk1.6.0_29_auto_\jdk.exe 
 [jdk1.6.0_29_auto_] $ S:\Hudson\tools\jdk1.6.0_29_auto_\jdk.exe /s /v / 
 qn /L \S:\Hudson\tools\jdk1.6.0_29_auto_\jdk.exe.install.log\ 
 REBOOT=ReallySuppress INSTALLDIR=\S:\Hudson\tools\jdk1.6.0_29_auto_\ 
 java.io.IOException: Cannot run program S:\Hudson\tools 
 \jdk1.6.0_29_auto_\jdk.exe (in directory S:\Hudson\tools 
 \jdk1.6.0_29_auto_): CreateProcess error=740, The requested operation 
 requires elevation 

 This wasn't unexpected, and since it works with UAC disabled on the 32- 
 bit nodes I have an obvious workround.  On the mac, however, there 
 seems to be a more fundamental problem: 

 Building remotely on 10.5.0.200 
 JDK installation skipped: Unknown CPU name: mac os x 
 Updating svn://luke/configuration-management/autotools 
 U pom.xml 
 At revision 82488 
 JDK installation skipped: Unknown CPU name: mac os x 
 [autotools] $ /Users/jenkins/slave/tools/Ant_1.8.2/bin/ant -version 
 Error: JAVA_HOME is not defined correctly. 
   We cannot execute /Users/jenkins/slave/tools/jdk1.6.0_29_auto_/bin/ 
 java 
 Build step 'Invoke Ant' marked build as failure 
 Finished: FAILURE 

 'uname -a' reports Darwin iOS-Build-Server.local 11.2.0 Darwin Kernel 
 Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/ 
 RELEASE_X86_64 x86_64 on this node. 

 The machine has Xcode installed (and not GCC), if that makes any 
 difference.

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Jenkins Job list empty after JENKINS_HOME was moved

2013-07-29 Thread Thomas Keller
Hi all!

I moved our Jenkins instance from a java -jar-based installation to one 
using Tomcat as servlet container. Jenkins comes up as it should and 
according to catalina.out it finds its Home directory at the correct place 
(and all files in the home directory are owned by the tomcat user), still, 
the jobs are not loaded and apparently other things like installed plugins 
neither.

Is there any way to debug this issue?

Thanks in advance,
Thomas.

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins Job list empty after JENKINS_HOME was moved

2013-07-29 Thread Thomas Keller
Sorry, I forgot, but this is Jenkins 1.524.


Am Montag, 29. Juli 2013 18:01:08 UTC+2 schrieb Thomas Keller:

 Hi all!

 I moved our Jenkins instance from a java -jar-based installation to one 
 using Tomcat as servlet container. Jenkins comes up as it should and 
 according to catalina.out it finds its Home directory at the correct place 
 (and all files in the home directory are owned by the tomcat user), still, 
 the jobs are not loaded and apparently other things like installed plugins 
 neither.

 Is there any way to debug this issue?

 Thanks in advance,
 Thomas.


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.