Re: Error getting the SSL context object

2018-03-13 Thread Joey Piccola
Also had this issue, matching the privateKey and keyStore solved it. 

On Monday, March 6, 2017 at 9:26:59 AM UTC-7, raghaven...@gmail.com wrote:
>
> Thanks for the post steven, I had the same issue i.e. different password 
> for keystore and key. recreating the keystore and key with the same 
> resolved it.
>
>
> On Friday, December 19, 2014 at 2:05:59 PM UTC-5, Steven Erat wrote:
>>
>> I encountered the same exception.  The short answer is that the 
>> privateKey password did not match the keyStore password, at first.   When I 
>> realized this could be a problem, I tried setting the JENKINS_ARG option 
>> —httpsPrivateKeyPassword to in addition to the --httpsKeyStorePassword, but 
>> I got a "Unrecognized option" from Winstone which didn't make sense.
>>
>> Here's a snippet of correspondence when I was describing the situation to 
>> a colleague:
>> -
>>
>> Looking at the Winstone class where the last exception came from: 
>>
>> https://github.com/jenkinsci/winstone/blob/master/src/java/winstone/HttpsConnectorFactory.java
>>
>> There was the following comment block:
>>
>> // There are many legacy setups in which the KeyStore password and the
>> // key password are identical and people will not even be aware that these
>> // are two different things
>> // Therefore if no httpsPrivateKeyPassword is explicitely set we try to
>> // use the KeyStore password also for the key password not to break
>> // backward compatibility
>> // Otherwise the following code will completely break the startup of
>> // Jenkins in case the --httpsPrivateKeyPassword parameter is not set
>> privateKeyPassword = Option.HTTPS_PRIVATE_KEY_PASSWORD.get(args, 
>> keystorePassword);
>>
>> Then I found the Winstone options class, which also showed that a 
>> ‘httpsPrivateKeyPassword’ option could be passed.  So I changed the 
>> /etc/sysconfig/jenkins to use this instead:
>>
>> JENKINS_ARGS="--httpsPort=443 
>> --httpsKeyStore=/usr/lib/jenkins/certs/jenkins.jks  
>> --httpsKeyStorePassword=abc --httpsPrivateKeyPassword=xyz"
>>
>> However, starting Jenkins still failed, but this time with 
>> “java.lang.IllegalArgumentException: Unrecognized option: 
>> —httpsPrivateKeyPassword”, and that doesn’t make sense at all.
>>
>> I going try to recreate the jenkins.jks keystone that I’m using, but 
>> match the private key password that I used originally.If they both have 
>> the same password, then I don’t have to pass in "—httpsPrivateKeyPassword” 
>> separately.
>>
>> Ok,  recreating the jks file with the same password used for the private 
>> key password worked.  Jenkins would start and the SSL cert was verified in 
>> the browser. 
>>
>

-- 
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/62d9e104-0b5f-462a-9db2-67e0858e7dac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Resource Locking Plugin hangs

2018-03-13 Thread Sverre Moe
tirsdag 13. mars 2018 15.52.32 UTC+1 skrev Steven Foster følgende:
>
> On Tuesday, March 13, 2018 at 1:02:02 PM UTC, Sverre Moe wrote:
>>
>> Looks like there is a fix for this in the works.
>> https://github.com/jenkinsci/lockable-resources-plugin/pull/70
>>
>
> I *think* this fix is just for manual reservation/unreservation of a 
> resource by a user (there's a button in the list of resources)
>

That's too bad. I had my hopes up that fix would solve my problem. I have 
asked that question on the GitHub issue.
For the time being we are locking around the parallel step with one 
resource on the Build stage and the same resource on Publish stage.
This adds a severe bottleneck to the build time. Would be much better if we 
could use one resource lock for each parallel stage.

-- 
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/de2cda60-7ad7-4a99-83b8-542dd23dec32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Break init scripts up in to re-usable classes

2018-03-13 Thread Ewelina Wilkosz
you're right, it is only alpha so far and I wouldn't say it's production 
ready, but should be pretty soon - I hope to have next, more reliable 
release in April
but I'm part of the team working on the plugin, not using it yet :) so 
maybe someone here is actually happy enough with current version 

as for LDAP I know there are some 
issues: https://github.com/jenkinsci/configuration-as-code-plugin/issues/138 
and I was not able to solve it, yet
keep an eye on the plugin though, contributors are very active and we 
really believe it will be THE configuration as code solution for Jenkins

On Tuesday, March 13, 2018 at 10:00:52 AM UTC+1, Edd Grant wrote:
>
> Thanks for the response R Tyler Croy, I'm suddenly kicking myself for not 
> finding that plugin when I looked for stuff like this!
>
> I notice the plugin is currently at 0.1 alpha, do (or do other folks here) 
> have any experience using it? It it fairly reliable doing the things it 
> mentions in the docs (LDAP config etc)? I'm torn as we have additional 
> requirements such as loading up trust stores etc and I'd rather not have 2 
> separate mechanisms to configure different bits of Jenkins.
>
> Cheers,
>
> Edd 
>
> On Monday, 12 March 2018 21:57:42 UTC, Edd Grant wrote:
>>
>> Hi folks,
>>
>> I'm using the init hook script mechanism ($JENKINS_HOME/init.groovy.d) to 
>> programmatically configure Jenkins. I'm building up quite a library of code 
>> and want to split it out in to re-usable classes, to keep things 
>> maintainable and make it easier to write well focused tests etc. I have 
>> tried the following with no luck:
>>
>> 1: Trying to split classes out in to separate scripts and using Groovy's 
>> 'evaluate' function to load the classes from each script (basically trying 
>> to re-implement some sort of importing behaviour). This doesn't work at all 
>> due to the way Groovy manipulates scripts.
>>
>> 2: Putting my classes in a jar file and adding this to WEB-INF/lib in the 
>> Jenkins war. This approach leads to classloader errors, presumably because 
>> the jar classloader that my code belongs to doesn't have access to Jenkins' 
>> PluginManager 'uberClassLoader'?  
>>
>> 3: Same as [2] but adding the jar to the JVM's classpath rather than 
>> adding it to the jar. Same result as [2].
>>
>> Has anyone tried doing anything similar to this before? I'm really keen 
>> to be able to do things like organise my code in packages and keep it in 
>> small maintainable units. Grateful for any suggestions.
>>
>> Cheers,
>>
>> Edd
>>
>

-- 
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/ed5d103d-96eb-4585-928d-04e66c6bbaf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to get the list of changes since the last successful build via script

2018-03-13 Thread meh . 2000
I'm fairly new to Jenkins, although my workplace has been using it for some 
time for automated builds.
We are using Jenkins version 2.60.1

I've been asked to help our build team by writing a script to execute 
during/after a build which will get all the changes since the last 
successful build and parse it, pulling out JIRA/Rally ticket numbers and 
doing something interesting with them.

I'm not sure where to start. I can see that when I look at a completed 
build, there is a menu item on the left called Changes and when I click on 
that, I see the list of Git commits which went into this build.

Where can I create a script which will get this list and give me some 
ability to parse it and do something with it (I'm not sure what they want 
to do yet - perhaps send an e-mail or create an information page which 
would be shown in Jenkins, if that's even possible)?

Do I add something to the build's configuration? In there I see General, 
Source Code Management, Build Triggers, Build Environment, Build and 
Post-build Actions.

Please let me know if you would like more information about what we're 
trying to do.

Thanks for any pointers.

-- 
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/14387110-59f7-43f3-a2aa-e9d6420663d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Resource Locking Plugin hangs

2018-03-13 Thread Steven Foster
On Tuesday, March 13, 2018 at 1:02:02 PM UTC, Sverre Moe wrote:
>
> Looks like there is a fix for this in the works.
> https://github.com/jenkinsci/lockable-resources-plugin/pull/70
>

I *think* this fix is just for manual reservation/unreservation of a 
resource by a user (there's a button in the list of resources)

-- 
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/cee55f32-131d-4480-a2ee-5e9a5e0fa97d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Resource Locking Plugin hangs

2018-03-13 Thread Sverre Moe
Looks like there is a fix for this in the works.
https://github.com/jenkinsci/lockable-resources-plugin/pull/70

-- 
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/567044aa-7731-49cf-ab6a-82f555658dd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Resource Locking Plugin hangs

2018-03-13 Thread Sverre Moe
Running two builds of pipeline-test2 works fine. The second build gets all 
three resources when the first build has released them.
So seems the problem is when locking on label. The build will only get the 
first release lock.

tirsdag 13. mars 2018 08.44.21 UTC+1 skrev Sverre Moe følgende:
>
> I created two seperate pipeline jobs to test this with.
> Got the same behaviour.
>
> *pipeline-test1*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *def stepsForParallel = [:]stepsForParallel["nodeName4"] = 
> transformIntoStep("nodeName4")parallel stepsForParalleldef 
> transformIntoStep(nodeName) {return {node("master") {  
>   lock(label: "testing-repository") {println "Testing lock 
> label"sleep 60}}}}*
> OUTPUT
>
> *[Pipeline] parallel[Pipeline] [nodeName4] { (Branch: nodeName4)[Pipeline] 
> [nodeName4] node[nodeName4] Running on Jenkins in 
> /var/lib/jenkins/workspace/pipeline-test[Pipeline] [nodeName4] {[Pipeline] 
> [nodeName4] lock[nodeName4] Trying to acquire lock on [Label: 
> testing-repository][nodeName4] Lock acquired on [Label: 
> testing-repository][Pipeline] [nodeName4] {[Pipeline] [nodeName4] 
> echo[nodeName4] Testing lock label[Pipeline] [nodeName4] sleep[nodeName4] 
> Sleeping for 1 min 0 sec[Pipeline] [nodeName4] }[nodeName4] Lock released 
> on resource [Label: testing-repository][Pipeline] [nodeName4] // 
> lock[Pipeline] [nodeName4] }[Pipeline] [nodeName4] // node[Pipeline] 
> [nodeName4] }[Pipeline] // parallel[Pipeline] End of PipelineFinished: 
> SUCCESS*
>
> *pipeline-test2*
> def stepsForParallel = [:]
> stepsForParallel["nodeName1"] = transformIntoStep("nodeName1")
> stepsForParallel["nodeName2"] = transformIntoStep("nodeName2")
> stepsForParallel["nodeName3"] = transformIntoStep("nodeName3")
>
> parallel stepsForParallel
>
> def transformIntoStep(nodeName) {
> return {
> node("master") {
> if (nodeName.equals("nodeName1")) {
> lock(resource: 'testing1-repository') {
> println "Testing lock resource"
> sleep 30
> }   
> }
> 
> if (nodeName.equals("nodeName2")) {
> lock(resource: 'testing2-repository') {
> println "Testing lock resource"
> sleep 30
> }   
> }
> 
> if (nodeName.equals("nodeName3")) {
> lock(resource: 'testing3-repository') {
> println "Testing lock resource"
> sleep 30
> }   
> }
> }
> }
> }
>
> *OUTPUT*
>
> *[Pipeline] parallel[Pipeline] [nodeName1] { (Branch: nodeName1)[Pipeline] 
> [nodeName2] { (Branch: nodeName2)[Pipeline] [nodeName3] { (Branch: 
> nodeName3)[Pipeline] [nodeName1] node[nodeName1] Running on Jenkins in 
> /var/lib/jenkins/workspace/pipeline-test3[Pipeline] [nodeName2] 
> node[Pipeline] [nodeName3] node[nodeName2] Running on Jenkins in 
> /var/lib/jenkins/workspace/pipeline-test3@2[nodeName3] Running on Jenkins 
> in /var/lib/jenkins/workspace/pipeline-test3@3[Pipeline] [nodeName1] 
> {[Pipeline] [nodeName2] {[Pipeline] [nodeName3] {[Pipeline] [nodeName1] 
> lock[nodeName1] Trying to acquire lock on [testing1-repository][nodeName1] 
> Found 0 available resource(s). Waiting for correct amount: 1.[nodeName1] 
> [testing1-repository] is locked, waiting...[Pipeline] [nodeName2] 
> lock[nodeName2] Trying to acquire lock on [testing2-repository][nodeName2] 
> Found 0 available resource(s). Waiting for correct amount: 1.[nodeName2] 
> [testing2-repository] is locked, waiting...[Pipeline] [nodeName3] 
> lock[nodeName3] Trying to acquire lock on [testing3-repository][nodeName3] 
> Found 0 available resource(s). Waiting for correct amount: 1.[nodeName3] 
> [testing3-repository] is locked, waiting...[nodeName1] Lock acquired on 
> [testing1-repository][Pipeline] [nodeName1] {[Pipeline] [nodeName1] 
> echo[nodeName1] Testing lock resource[Pipeline] [nodeName1] 
> sleep[nodeName1] Sleeping for 30 sec[Pipeline] [nodeName1] }[nodeName1] 
> Lock released on resource [testing1-repository][Pipeline] [nodeName1] // 
> lock[Pipeline] [nodeName1] }[Pipeline] [nodeName1] // node[Pipeline] 
> [nodeName1] }Aborted by Sverre Moe[Pipeline] [nodeName3] // lock[Pipeline] 
> [nodeName2] // lock[Pipeline] [nodeName2] }[Pipeline] [nodeName3] 
> }[Pipeline] [nodeName2] // node[Pipeline] [nodeName3] // node[Pipeline] 
> [nodeName2] }[nodeName2] Failed in branch nodeName2[Pipeline] [nodeName3] 
> }[nodeName3] Failed in branch nodeName3[Pipeline] // parallel[Pipeline] End 
> of PipelineException: 
> nullorg.jenkinsci.plugins.workflow.steps.FlowInterruptedException at 
> org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.cancel(CpsBodyExecution.java:245)
>  
> at 
> org.jenkinsci.plugins.workflow.steps.BodyExecution.cancel(BodyExecution.java:76)
>  
> at 
> 

Re: Directory does not exist while compilling just through Jenkins

2018-03-13 Thread Fábio Cabrita


This is the pipeline configuration that is being used:




segunda-feira, 12 de Março de 2018 às 14:35:33 UTC, Fábio Cabrita escreveu:
>
> Hello,
>
> I am trying to compile one repo with a jenkinsfile from a remote git, when 
> a change is detected, but while it tries to compile I receive this error:
>
> :: error: (1180) directory "dist/default/production" does not exist
>
> And I really dont know why, since I am able to compile manually in this 
> system, and while it is compiling it creates new folders and files during 
> compilation.
>
>
> In jenkins there is no sign of new folders, I have already double checked at 
> jenkins home directory. 
>
>
> Do you know what can be the source of this problem?
>
>
> Thanks!
>
>

-- 
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/066bfdef-fdc1-4509-83f7-a0fbd24c2cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Directory does not exist while compilling just through Jenkins

2018-03-13 Thread Fábio Cabrita


segunda-feira, 12 de Março de 2018 às 14:35:33 UTC, Fábio Cabrita escreveu:
>
> Hello,
>
> I am trying to compile one repo with a jenkinsfile from a remote git, when 
> a change is detected, but while it tries to compile I receive this error:
>
> :: error: (1180) directory "dist/default/production" does not exist
>
> And I really dont know why, since I am able to compile manually in this 
> system, and while it is compiling it creates new folders and files during 
> compilation.
>
>
> In jenkins there is no sign of new folders, I have already double checked at 
> jenkins home directory. 
>
>
> Do you know what can be the source of this problem?
>
>
> Thanks!
>
>

-- 
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/aa5ad89c-cf45-4d4f-8c88-47cfc0bac6c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: withMaven dependency trigger - Need help to understand the error message

2018-03-13 Thread Cyrille Le Clerc
Ack.

We need to improve the troubleshooting guide "Why my downstream job doesn't 
get triggered".

A SQL approach could be interesting but as our queries are no trivial, 
there would be a risk of misunderstanding. Maybe adding a troubleshooting 
API/GUI/CLI on the withMaven pipeline graph is the most efficient way.

Cyrille

On Tuesday, March 13, 2018 at 3:12:38 AM UTC+1, Dan Tran wrote:
>
> I believe I don't have the scenario that you described.  Mine is more 
> likeProject A, B, and C   depends on D,   after D builds, A, B, and C 
> are not built
>
> So I need to troubleshoot, to see what I missed from my setup
>
> -D
>
> On Monday, March 12, 2018 at 9:00:20 AM UTC-7, Cyrille Le Clerc wrote:
>>
>>
>> > How can I troubleshoot this?
>>
>> I discussed this feature with Arnaud Héritier today for another use case.
>>
>> My understanding is that it is "work as design" and that you ask for an 
>> improvement to disable this JENKINS-46313 Avoid excessive triggering of 
>> downstream jobs 
>>  capability.
>>
>> Do you have the same understanding of the status? If so, can you please 
>> open an RFE ticket on Jira?
>>
>> Cyrille
>>
>>
>> https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.4.3/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/listeners/DownstreamPipelineTriggerRunListener.java#L74
>>
>> On Sunday, March 11, 2018 at 8:05:40 PM UTC+1, Dan Tran wrote:
>>>
>>> Thanks for the explanation.  It is clear now
>>>
>>> In my case, I downstream should be built regardless, but it is not.  
>>>
>>> How can I troubleshoot this?
>>>
>>> Thanks
>>>
>>> -D
>>>
>>> On Sunday, March 11, 2018 at 9:37:13 AM UTC-7, Cyrille Le Clerc wrote:

 Sample: projects framework, shared-lib and webapp.

 Both shared-lib and webapp depend on framework and webapp also depend 
 on shared-lib.

 When framework build succeeds, it should trigger both shared-lib and 
 webapp. But it's a "waste" to trigger webapp now because shared-lib will 
 trigger "webapp" when it succeeds.

 This is the message you get.



-- 
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/44d60c5b-5295-4c7e-975d-e2363c2171b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Break init scripts up in to re-usable classes

2018-03-13 Thread Edd Grant
Thanks for the response R Tyler Croy, I'm suddenly kicking myself for not 
finding that plugin when I looked for stuff like this!

I notice the plugin is currently at 0.1 alpha, do (or do other folks here) 
have any experience using it? It it fairly reliable doing the things it 
mentions in the docs (LDAP config etc)? I'm torn as we have additional 
requirements such as loading up trust stores etc and I'd rather not have 2 
separate mechanisms to configure different bits of Jenkins.

Cheers,

Edd 

On Monday, 12 March 2018 21:57:42 UTC, Edd Grant wrote:
>
> Hi folks,
>
> I'm using the init hook script mechanism ($JENKINS_HOME/init.groovy.d) to 
> programmatically configure Jenkins. I'm building up quite a library of code 
> and want to split it out in to re-usable classes, to keep things 
> maintainable and make it easier to write well focused tests etc. I have 
> tried the following with no luck:
>
> 1: Trying to split classes out in to separate scripts and using Groovy's 
> 'evaluate' function to load the classes from each script (basically trying 
> to re-implement some sort of importing behaviour). This doesn't work at all 
> due to the way Groovy manipulates scripts.
>
> 2: Putting my classes in a jar file and adding this to WEB-INF/lib in the 
> Jenkins war. This approach leads to classloader errors, presumably because 
> the jar classloader that my code belongs to doesn't have access to Jenkins' 
> PluginManager 'uberClassLoader'?  
>
> 3: Same as [2] but adding the jar to the JVM's classpath rather than 
> adding it to the jar. Same result as [2].
>
> Has anyone tried doing anything similar to this before? I'm really keen to 
> be able to do things like organise my code in packages and keep it in small 
> maintainable units. Grateful for any suggestions.
>
> Cheers,
>
> Edd
>

-- 
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/69f48e62-b013-4721-9413-1a43ef53ab2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Resource Locking Plugin hangs

2018-03-13 Thread Sverre Moe
I created two seperate pipeline jobs to test this with.
Got the same behaviour.

*pipeline-test1*















*def stepsForParallel = [:]stepsForParallel["nodeName4"] = 
transformIntoStep("nodeName4")parallel stepsForParalleldef 
transformIntoStep(nodeName) {return {node("master") {  
  lock(label: "testing-repository") {println "Testing lock 
label"sleep 60}}}}*
OUTPUT

*[Pipeline] parallel[Pipeline] [nodeName4] { (Branch: nodeName4)[Pipeline] 
[nodeName4] node[nodeName4] Running on Jenkins in 
/var/lib/jenkins/workspace/pipeline-test[Pipeline] [nodeName4] {[Pipeline] 
[nodeName4] lock[nodeName4] Trying to acquire lock on [Label: 
testing-repository][nodeName4] Lock acquired on [Label: 
testing-repository][Pipeline] [nodeName4] {[Pipeline] [nodeName4] 
echo[nodeName4] Testing lock label[Pipeline] [nodeName4] sleep[nodeName4] 
Sleeping for 1 min 0 sec[Pipeline] [nodeName4] }[nodeName4] Lock released 
on resource [Label: testing-repository][Pipeline] [nodeName4] // 
lock[Pipeline] [nodeName4] }[Pipeline] [nodeName4] // node[Pipeline] 
[nodeName4] }[Pipeline] // parallel[Pipeline] End of PipelineFinished: 
SUCCESS*

*pipeline-test2*
def stepsForParallel = [:]
stepsForParallel["nodeName1"] = transformIntoStep("nodeName1")
stepsForParallel["nodeName2"] = transformIntoStep("nodeName2")
stepsForParallel["nodeName3"] = transformIntoStep("nodeName3")

parallel stepsForParallel

def transformIntoStep(nodeName) {
return {
node("master") {
if (nodeName.equals("nodeName1")) {
lock(resource: 'testing1-repository') {
println "Testing lock resource"
sleep 30
}   
}

if (nodeName.equals("nodeName2")) {
lock(resource: 'testing2-repository') {
println "Testing lock resource"
sleep 30
}   
}

if (nodeName.equals("nodeName3")) {
lock(resource: 'testing3-repository') {
println "Testing lock resource"
sleep 30
}   
}
}
}
}

*OUTPUT*

*[Pipeline] parallel[Pipeline] [nodeName1] { (Branch: nodeName1)[Pipeline] 
[nodeName2] { (Branch: nodeName2)[Pipeline] [nodeName3] { (Branch: 
nodeName3)[Pipeline] [nodeName1] node[nodeName1] Running on Jenkins in 
/var/lib/jenkins/workspace/pipeline-test3[Pipeline] [nodeName2] 
node[Pipeline] [nodeName3] node[nodeName2] Running on Jenkins in 
/var/lib/jenkins/workspace/pipeline-test3@2[nodeName3] Running on Jenkins 
in /var/lib/jenkins/workspace/pipeline-test3@3[Pipeline] [nodeName1] 
{[Pipeline] [nodeName2] {[Pipeline] [nodeName3] {[Pipeline] [nodeName1] 
lock[nodeName1] Trying to acquire lock on [testing1-repository][nodeName1] 
Found 0 available resource(s). Waiting for correct amount: 1.[nodeName1] 
[testing1-repository] is locked, waiting...[Pipeline] [nodeName2] 
lock[nodeName2] Trying to acquire lock on [testing2-repository][nodeName2] 
Found 0 available resource(s). Waiting for correct amount: 1.[nodeName2] 
[testing2-repository] is locked, waiting...[Pipeline] [nodeName3] 
lock[nodeName3] Trying to acquire lock on [testing3-repository][nodeName3] 
Found 0 available resource(s). Waiting for correct amount: 1.[nodeName3] 
[testing3-repository] is locked, waiting...[nodeName1] Lock acquired on 
[testing1-repository][Pipeline] [nodeName1] {[Pipeline] [nodeName1] 
echo[nodeName1] Testing lock resource[Pipeline] [nodeName1] 
sleep[nodeName1] Sleeping for 30 sec[Pipeline] [nodeName1] }[nodeName1] 
Lock released on resource [testing1-repository][Pipeline] [nodeName1] // 
lock[Pipeline] [nodeName1] }[Pipeline] [nodeName1] // node[Pipeline] 
[nodeName1] }Aborted by Sverre Moe[Pipeline] [nodeName3] // lock[Pipeline] 
[nodeName2] // lock[Pipeline] [nodeName2] }[Pipeline] [nodeName3] 
}[Pipeline] [nodeName2] // node[Pipeline] [nodeName3] // node[Pipeline] 
[nodeName2] }[nodeName2] Failed in branch nodeName2[Pipeline] [nodeName3] 
}[nodeName3] Failed in branch nodeName3[Pipeline] // parallel[Pipeline] End 
of PipelineException: 
nullorg.jenkinsci.plugins.workflow.steps.FlowInterruptedException at 
org.jenkinsci.plugins.workflow.cps.CpsBodyExecution.cancel(CpsBodyExecution.java:245)
 
at 
org.jenkinsci.plugins.workflow.steps.BodyExecution.cancel(BodyExecution.java:76)
 
at 
org.jenkinsci.plugins.workflow.cps.steps.ParallelStepExecution.stop(ParallelStepExecution.java:67)
 
at org.jenkinsci.plugins.workflow.cps.CpsThread.stop(CpsThread.java:296) at 
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6.onSuccess(CpsFlowExecution.java:1083)
 
at 
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6.onSuccess(CpsFlowExecution.java:1072)
 
at 
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:861)
 
at 

Jenkins workspace cleanup thread

2018-03-13 Thread padmasrinijana via Jenkins Users
I have a pipeline job(name: MyPipelineJob )..which is running for last 
6days. 
Jenkins is checking for automatic workspace-cleanup process every day and 
my workspace was deleted even though my job was running at the time of 
deletion and then MyPipelineJob got aborted because of missing workspace 
excepiton.

This is my Workspace\ clean-up.log file content:
Started at Sat Mar 10 03:21:28 PST 2018
Checking job1
Checking job2
Checking job3
Checking job4
Checking MyPipelineJob
Finished at Sat Mar 10 03:21:38 PST 2018. 9386ms
Started at Sun Mar 11 04:21:28 PDT 2018
Checking job1
Checking job2
Checking job3
Checking job4
Checking MyPipelineJob
Deleting /.jenkins/workspace/MyPipelineJob on Jenkins
Finished at Sun Mar 11 04:21:38 PDT 2018. 9451ms

then I set hudson.model.WorkspaceCleanupThread.disabled=true , 
but still jenkins is checking for workspace cleanup..Any reason why jenkins 
deleted the pipeline job's workspace which was running at the time of 
deletion and how to avoid it?

Thanks,

-- 
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/e73da2d4-794d-4f17-99da-35d161d33484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.