Declarative pipeline "when" tag is pushed

2017-12-19 Thread Lynn Lin
HI ,All,

 i followed with 
page https://wiki.jenkins.io/display/JENKINS/GitHub+Branch+Source+Plugin to 
enable tag will trigger a new build then the questions comes 

How can I use "when" in declarative pipeline to do something like 
deployment when a new tag is pushed to remote repository


stage('Example Deploy') {
when {
branch 'production' // here how we can use tag as condition 
}
steps {
echo 'Deploying'
}
}




"

   - When used with the Branch API Plugin 
   , tags will 
   show up as a new category. The default configuration of Branch API will not 
   trigger builds for tags automatically. 
   
   This is by design, as one of the use-cases for tag discovery is to use 
   the tag job to perform deployment. If tags were built automatically, given 
   that the order in which the tag jobs actually execute is undefined, the 
   automatic build could cause significant issues. Branch API does provide a 
   mechanism to control what gets built automatically (known as the 
   BranchBuildStrategy) but that cannot be configured until you have at 
   least one extension plugin that provides a BranchBuildStrategy. 
   
   If you want tags to build automatically, you will need an extension 
   plugin for Branch API that implements at least one BranchBuildStrategy, 
   see AngryBytes/jenkins-build-everything-strategy-plugin 
    for 
   a prototype example of such an extension plugin.

“


Thanks
Lynn

-- 
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/7f91e19e-1e8f-45a4-8a36-d5d620867979%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build periodically not working in Jenkins v2.92

2017-12-19 Thread Daniel Beck

> On 19. Dec 2017, at 23:46, arunlakhanpal  wrote:
> 
> Please share views/advise on the same to help me fix this.

Check the /threadDump URL for timer/trigger related threads being busy, as well 
as the Jenkins log for errors related to timers/triggers.

-- 
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/ACA8B198-33A7-4D0B-AD1F-BE8569BA5A9E%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Build periodically not working in Jenkins v2.92

2017-12-19 Thread arunlakhanpal
Hi there,

The build periodically functionality of jenkins in our environment stopped
working randomly about a month back (v2.62), after trying multiple reboots,
writing jobs again from scratch etc. hacks with no luck at fixing the issue,
I decided to upgrade jenkins to 2.92, the upgrade though successful, did not
help fix the issue. However, I just took a clone of the server a couple of
days back, and weirdly the clone has the same functionality working just
fine, while the original jenkins server still has it broken.

Please share views/advise on the same to help me fix this.

Many Thanks.

Arun




--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-users-f361316.html

-- 
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/1513723561448-0.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins Deadlock

2017-12-19 Thread 'Mark Ketchum' via Jenkins Users
After upgrading from 2.73.3 to 2.89.2 our jenkins has started to experience 
deadlock.

We use the tikal Multijob plugin to run any number of other jobs that 
extend a common job template. When the Multijob kicks off, it will spin up 
as many AWS slaves as it needs to run all of the child jobs (Test-Suites in 
the stack trace). Everytime we run one of these Multijob jobs, Jenkins 
locks up.

Attached is the deadlock stack traces from a thread dump.

Anyone seen this? Anywhere we can look to fix it?

Thanks in advance!

-- 
*CONFIDENTIALITY NOTICE: This email may contain confidential and privileged 
material for the sole use of the intended recipient(s). Any review, use, 
distribution or disclosure by others is strictly prohibited.  If you have 
received this communication in error, please notify the sender immediately 
by e-mail and delete the message and any file attachments from your 
computer. Thank you.*

-- 
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/8dc5106e-c5f0-48f2-afc0-1f08f3d8f89f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jenkins-deadlock
Description: Binary data


Re: Fwd: Disconnect node / reconnect node programmatically (Groovy)

2017-12-19 Thread sridevikishoret

>
> Hi,
>
>I want to have a script (bash) which can disconnect & 
reconnect a Jenkins slave connected through JNLP.
   Please do the needful.

  Thanks & Regards,

  Sridevi  

-- 
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/d6292149-0f3e-4402-baa3-f2738ee05f78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Changeset in when

2017-12-19 Thread Sharon Grubner
In the declarative pipelines presentation at Jenkins World 2017 they 
presented a nice feature where you can execute certain pipeline stages 
based on changesets.
You can see the syntax in slide 14: 
https://schd.ws/hosted_files/jenkinsworld20162017/49/Declarative%20Pipelines%20in%20Jenkins%20-%20Jenkins%20World%202017.pdf

I haven't had much luck using it or finding any documentation about this 
feature.
Does anyone have any suggestions?

Thanks,
Sharon

-- 
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/4e65e0d0-1101-469b-9c83-d515ffc933fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker Plugin - Jenkins doesn't have label....

2017-12-19 Thread Mandy Hubbard
I updated my docker-plugin to 1.1.2 also.  

On Tuesday, December 19, 2017 at 10:11:29 AM UTC-6, nicolas de loof wrote:
>
> JENKINS-48490 is not implemented in jenkins-core but docker-plugin, and 
> should be fixed in 1.1.2
>
> 2017-12-19 16:18 GMT+01:00 Mandy Hubbard  >:
>
>> JENKINS-48490 is fixed in 2.89.1.  I upgraded to 2.89.1 and am still 
>> seeing the issue.  I plan to open a new defect for this.
>>
>> On Monday, December 11, 2017 at 5:32:05 PM UTC-6, Mandy Hubbard wrote:
>>>
>>> Thanks for the reply, Nicolas.  Can't say it is the response I was 
>>> hoping for but at least I know it's not just me.  I've had it working many 
>>> times before so I knew I had configured it correctly.  Any hints for 
>>> working around this for now?  I tried restarting Jenkins but it didn't 
>>> help. 
>>>
>>> On Monday, December 11, 2017 at 2:24:08 PM UTC-6, nicolas de loof wrote:

 sounds to me this is more or less 
 https://issues.jenkins-ci.org/browse/JENKINS-48490
 which is a recurrent issue. Still looking for a definitive fix


 2017-12-11 17:49 GMT+01:00 Mandy Hubbard :

> Using the Docker Plugin to run Jenkins agents in containers, I often 
> get the error "Jenkins doesn't have label " even when I have 
> the template configured properly and the Docker image is already present 
> on 
> the Docker host.  I have sometimes been able to fix it by removing the 
> image and re-pulling it to the host but at other times I am completely 
> stuck.  I've tried it using a tag and with no tag.  Has anyone else run 
> into this?  Do you have any hints on what it could be?
>
> Job run log says:
>
> Still waiting to schedule task
> Jenkins doesn’t have label python
>
>
> Here's my docker image
> jenkins@b1e2e4c28dbd:/$ docker images
> REPOSITORY  TAG IMAGE ID
> CREATED SIZE
> devmandy/python-jenkins-agent   1   6cc6f98875bc2 
> hours ago 991MB
>
> A screenshot of my Jenkins config is attached. 
>
>
> -- 
> 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-use...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/bd8e173f-844b-4b48-9ba6-56df650b0868%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

 -- 
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/82b914ce-695e-47ba-aaac-041afcc6a7f6%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/fa4fa9d9-3c32-4eb6-a78a-434c69ac5e5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker Plugin - Jenkins doesn't have label....

2017-12-19 Thread nicolas de loof
JENKINS-48490 is not implemented in jenkins-core but docker-plugin, and
should be fixed in 1.1.2

2017-12-19 16:18 GMT+01:00 Mandy Hubbard :

> JENKINS-48490 is fixed in 2.89.1.  I upgraded to 2.89.1 and am still
> seeing the issue.  I plan to open a new defect for this.
>
> On Monday, December 11, 2017 at 5:32:05 PM UTC-6, Mandy Hubbard wrote:
>>
>> Thanks for the reply, Nicolas.  Can't say it is the response I was hoping
>> for but at least I know it's not just me.  I've had it working many times
>> before so I knew I had configured it correctly.  Any hints for working
>> around this for now?  I tried restarting Jenkins but it didn't help.
>>
>> On Monday, December 11, 2017 at 2:24:08 PM UTC-6, nicolas de loof wrote:
>>>
>>> sounds to me this is more or less https://issues.jenkins-ci
>>> .org/browse/JENKINS-48490
>>> which is a recurrent issue. Still looking for a definitive fix
>>>
>>>
>>> 2017-12-11 17:49 GMT+01:00 Mandy Hubbard :
>>>
 Using the Docker Plugin to run Jenkins agents in containers, I often
 get the error "Jenkins doesn't have label " even when I have
 the template configured properly and the Docker image is already present on
 the Docker host.  I have sometimes been able to fix it by removing the
 image and re-pulling it to the host but at other times I am completely
 stuck.  I've tried it using a tag and with no tag.  Has anyone else run
 into this?  Do you have any hints on what it could be?

 Job run log says:

 Still waiting to schedule task
 Jenkins doesn’t have label python


 Here's my docker image
 jenkins@b1e2e4c28dbd:/$ docker images
 REPOSITORY  TAG IMAGE ID
 CREATED SIZE
 devmandy/python-jenkins-agent   1   6cc6f98875bc2 
 hours ago 991MB

 A screenshot of my Jenkins config is attached.


 --
 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-use...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/jenkinsci-users/bd8e173f-844b-4b48-9ba6-56df650b0868%
 40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
> 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/82b914ce-695e-47ba-aaac-041afcc6a7f6%40googlegroups.
> com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANMVJzkxq_052LsywxdfaQVfqMT5R4Gb9tPUya2SGymxTcnX-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: "ERROR: missing workspace" and chaining builds

2017-12-19 Thread Vincent Massol
Note that we're having this problem only since we moved to pipeline.

Thanks
-Vincent

On Tuesday, December 19, 2017 at 4:28:07 PM UTC+1, Vincent Massol wrote:
>
>
>
> On Tuesday, December 19, 2017 at 2:10:36 PM UTC+1, Reinhold Füreder wrote:
>>
>> Hi Vincent,
>>
>>  
>>
>> does it work most of the times? If so, could it be related to 
>> https://issues.jenkins-ci.org/browse/JENKINS-27329 
>> 
>>  
>> “WorkspaceCleanupThread may delete workspaces of running jobs”?
>>
>
> Indeed it works most of the time and the problem only happens from time to 
> time. The issue you reference could well be the cause, thanks for pointing 
> it (I'll try to workaround mentioned in it).
>
> Thanks
> -Vincent
>
>  
>
>>  
>>
>> HTH Reinhold
>>
>>  
>>
>> *From:* jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] *On 
>> Behalf Of *Vincent Massol
>> *Sent:* Dienstag, 19. Dezember 2017 14:07
>> *To:* Jenkins Users 
>> *Subject:* Re: "ERROR: missing workspace" and chaining builds
>>
>>  
>>
>> Could it be that the workspace is deleted once the node() ends and that 
>> it happens that some other node() calls happen to run on the same node and 
>> that Jenkins would allocate a workspace only once per job? That would be 
>> strange though.
>>
>>  
>>
>> Thanks
>>
>> -Vincent
>>
>>
>> On Tuesday, December 19, 2017 at 2:01:32 PM UTC+1, Vincent Massol wrote:
>>
>> Hi guys,
>>
>>  
>>
>> I regularly get the following errors in our Jenkins pipeline on XWiki:
>>
>>  
>>
>> ERROR: missing workspace /home/hudsonagent/jenkins_root/workspace/
>> XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA
>>  
>> on agent-2-1
>>
>>  
>>
>> [main] Caused by: java.io.IOException: /home/hudsonagent/jenkins_root/
>> workspace/XWiki_xwiki-platform_master-
>> ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/
>> xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-
>> flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki 
>> doesn't exist.
>>
>>
>> Our Jenkins file does this:
>>
>>  
>>
>> stage ('Platform Builds') {
>>   parallel(
>> 'main': {
>>   build(
>> name: 'Main',
>> goals: 'clean deploy',
>> profiles: 'legacy,integration-tests,office-tests,snapshotModules'
>> ,
>> properties: '-Dxwiki.checkstyle.skip=true 
>> -Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
>>   )
>>   build(
>> name: 'Distribution',
>> goals: 'clean deploy',
>> profiles: 'legacy,integration-tests,office-tests,snapshotModules'
>> ,
>> pom: 'xwiki-platform-distribution/pom.xml'
>>   )
>>   build(), ...
>>   }, ...
>>
>>  
>>
>> (Full file here: 
>> https://github.com/xwiki/xwiki-platform/blob/40cf4cf65e73728d53ee30ffcabd1534640dc9c5/Jenkinsfile#L26
>>  
>> )
>>
>>  
>>
>> And build() is running Maven on a node() (xwikiBuild() is pipeline 
>> library running Maven):
>>
>>  
>>
>> def build(map)
>> {
>>   node {
>> xwikiBuild(map.name) {
>> ...
>> }
>>
>>   }
>> }
>>
>>
>> In this situation, do you see any reason for Jenkins to delete a 
>> workspace on "main" and a reason for each node() call to not request a new 
>> workspace? So in short I guess I'm asking for some clarification on when 
>> workspaces are initialized.
>>
>>  
>>
>> Thanks!
>>
>> -Vincent
>>
>>  
>>
>>  
>>
>> -- 
>> 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-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/e9c23914-c1cc-43db-86b2-e30c06d70583%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/9b737d19-f9a3-4bb4-9dd9-63e16595d014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "ERROR: missing workspace" and chaining builds

2017-12-19 Thread Vincent Massol


On Tuesday, December 19, 2017 at 2:10:36 PM UTC+1, Reinhold Füreder wrote:
>
> Hi Vincent,
>
>  
>
> does it work most of the times? If so, could it be related to 
> https://issues.jenkins-ci.org/browse/JENKINS-27329 
> 
>  
> “WorkspaceCleanupThread may delete workspaces of running jobs”?
>

Indeed it works most of the time and the problem only happens from time to 
time. The issue you reference could well be the cause, thanks for pointing 
it (I'll try to workaround mentioned in it).

Thanks
-Vincent

 

>  
>
> HTH Reinhold
>
>  
>
> *From:* jenkins...@googlegroups.com  [mailto:
> jenkins...@googlegroups.com ] *On Behalf Of *Vincent Massol
> *Sent:* Dienstag, 19. Dezember 2017 14:07
> *To:* Jenkins Users >
> *Subject:* Re: "ERROR: missing workspace" and chaining builds
>
>  
>
> Could it be that the workspace is deleted once the node() ends and that it 
> happens that some other node() calls happen to run on the same node and 
> that Jenkins would allocate a workspace only once per job? That would be 
> strange though.
>
>  
>
> Thanks
>
> -Vincent
>
>
> On Tuesday, December 19, 2017 at 2:01:32 PM UTC+1, Vincent Massol wrote:
>
> Hi guys,
>
>  
>
> I regularly get the following errors in our Jenkins pipeline on XWiki:
>
>  
>
> ERROR: missing workspace /home/hudsonagent/jenkins_root/workspace/
> XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA
>  
> on agent-2-1
>
>  
>
> [main] Caused by: java.io.IOException: /home/hudsonagent/jenkins_root/
> workspace/XWiki_xwiki-platform_master-
> ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/
> xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-
> flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki 
> doesn't exist.
>
>
> Our Jenkins file does this:
>
>  
>
> stage ('Platform Builds') {
>   parallel(
> 'main': {
>   build(
> name: 'Main',
> goals: 'clean deploy',
> profiles: 'legacy,integration-tests,office-tests,snapshotModules',
> properties: '-Dxwiki.checkstyle.skip=true 
> -Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
>   )
>   build(
> name: 'Distribution',
> goals: 'clean deploy',
> profiles: 'legacy,integration-tests,office-tests,snapshotModules',
> pom: 'xwiki-platform-distribution/pom.xml'
>   )
>   build(), ...
>   }, ...
>
>  
>
> (Full file here: 
> https://github.com/xwiki/xwiki-platform/blob/40cf4cf65e73728d53ee30ffcabd1534640dc9c5/Jenkinsfile#L26
>  
> )
>
>  
>
> And build() is running Maven on a node() (xwikiBuild() is pipeline library 
> running Maven):
>
>  
>
> def build(map)
> {
>   node {
> xwikiBuild(map.name) {
> ...
> }
>
>   }
> }
>
>
> In this situation, do you see any reason for Jenkins to delete a workspace 
> on "main" and a reason for each node() call to not request a new workspace? 
> So in short I guess I'm asking for some clarification on when workspaces 
> are initialized.
>
>  
>
> Thanks!
>
> -Vincent
>
>  
>
>  
>
> -- 
> 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-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/e9c23914-c1cc-43db-86b2-e30c06d70583%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/bb9aaa32-c83e-4f87-9e08-c1a725bf806d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker Plugin - Jenkins doesn't have label....

2017-12-19 Thread Mandy Hubbard
JENKINS-48490 is fixed in 2.89.1.  I upgraded to 2.89.1 and am still seeing 
the issue.  I plan to open a new defect for this.

On Monday, December 11, 2017 at 5:32:05 PM UTC-6, Mandy Hubbard wrote:
>
> Thanks for the reply, Nicolas.  Can't say it is the response I was hoping 
> for but at least I know it's not just me.  I've had it working many times 
> before so I knew I had configured it correctly.  Any hints for working 
> around this for now?  I tried restarting Jenkins but it didn't help. 
>
> On Monday, December 11, 2017 at 2:24:08 PM UTC-6, nicolas de loof wrote:
>>
>> sounds to me this is more or less 
>> https://issues.jenkins-ci.org/browse/JENKINS-48490
>> which is a recurrent issue. Still looking for a definitive fix
>>
>>
>> 2017-12-11 17:49 GMT+01:00 Mandy Hubbard :
>>
>>> Using the Docker Plugin to run Jenkins agents in containers, I often get 
>>> the error "Jenkins doesn't have label " even when I have the 
>>> template configured properly and the Docker image is already present on the 
>>> Docker host.  I have sometimes been able to fix it by removing the image 
>>> and re-pulling it to the host but at other times I am completely stuck.  
>>> I've tried it using a tag and with no tag.  Has anyone else run into this?  
>>> Do you have any hints on what it could be?
>>>
>>> Job run log says:
>>>
>>> Still waiting to schedule task
>>> Jenkins doesn’t have label python
>>>
>>>
>>> Here's my docker image
>>> jenkins@b1e2e4c28dbd:/$ docker images
>>> REPOSITORY  TAG IMAGE ID
>>> CREATED SIZE
>>> devmandy/python-jenkins-agent   1   6cc6f98875bc2 
>>> hours ago 991MB
>>>
>>> A screenshot of my Jenkins config is attached. 
>>>
>>>
>>> -- 
>>> 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-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/bd8e173f-844b-4b48-9ba6-56df650b0868%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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/82b914ce-695e-47ba-aaac-041afcc6a7f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Jenkins init.groovy compilation

2017-12-19 Thread Jason Grammenos
Thank you very much Reinhold Füreder

I will look into reflection, but probably just choose to ignore the errors and 
they do not end up causing problems anyways.
And I will consider filling a bug with Jenkins.


[Agility PR Solutions]
Jason Grammenos | Operations and Infrastructure Analyst
P: 613.232.7797 | Toll-free: 866.545.3745
Work hours: Monday-Friday, 8am-4:30pm ET
jason.gramme...@agilitypr.com
agilitypr.com (formerly MediaMiser)

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Reinhold Füreder
Sent: December 19, 2017 1:45 AM
To: jenkinsci-users@googlegroups.com
Subject: RE: Jenkins init.groovy compilation

Hi Jason,

yes, I remember stumbling over this as well.

Partially I have actually uses a workaround for that compilation failure: 
However, I am not sure it is worth it – because it is based on using 
reflection, e.g.:

def instance = Jenkins.getInstance()
…
// LDAPSecurityRealm class depends on "LDAP" plugin => use reflection for 
creation:
def ldapSecurityRealmClass = 
this.class.classLoader.loadClass('hudson.security.LDAPSecurityRealm')
SecurityRealm ldapRealm = ldapSecurityRealmClass.newInstance(server, 
rootDN, userSearchBase, userSearch, groupSearchBase, managerDN, 
managerPassword, inhibitInferRootDN)
instance.setSecurityRealm(ldapRealm)
instance.save()


And later on, IIRC, I mostly “only” relied on the init scripts (one for each 
responsibility “area”) checking whether or not a restart due to plugin 
installation/updates is still pending based on a kind of marker file (and 
ignoring compilation failures):

def restartFile = new File(instance.getRootDir(), "JenkinsRestartByInitScript")
if (restartFile.exists()) {
  println "--> Jenkins restart is pending: skipping this hook script"
  return
}
// Here follows the logic like setting up the LDAP security realm…


HTH -- although this is not a real solution,
Reinhold
--
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/AM4P190MB00677F1A1C76C862343A189EF70F0%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.

-- 
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/YTOPR0101MB100385502D752D88B987294DE40F0%40YTOPR0101MB1003.CANPRD01.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


Re: "ERROR: missing workspace" and chaining builds

2017-12-19 Thread Vincent Massol
Could it be that the workspace is deleted once the node() ends and that it 
happens that some other node() calls happen to run on the same node and 
that Jenkins would allocate a workspace only once per job? That would be 
strange though.

Thanks
-Vincent

On Tuesday, December 19, 2017 at 2:01:32 PM UTC+1, Vincent Massol wrote:
>
> Hi guys,
>
> I regularly get the following errors in our Jenkins pipeline on XWiki:
>
> ERROR: missing workspace /home/hudsonagent/jenkins_root/workspace/
> XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA
>  
> on agent-2-1
>
> [main] Caused by: java.io.IOException: /home/hudsonagent/jenkins_root/
> workspace/XWiki_xwiki-platform_master-
> ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/
> xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-
> flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki 
> doesn't exist.
>
> Our Jenkins file does this:
>
> stage ('Platform Builds') {
>   parallel(
> 'main': {
>   build(
> name: 'Main',
> goals: 'clean deploy',
> profiles: 'legacy,integration-tests,office-tests,snapshotModules',
> properties: '-Dxwiki.checkstyle.skip=true 
> -Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
>   )
>   build(
> name: 'Distribution',
> goals: 'clean deploy',
> profiles: 'legacy,integration-tests,office-tests,snapshotModules',
> pom: 'xwiki-platform-distribution/pom.xml'
>   )
>   build(), ...
>   }, ...
>
> (Full file here: 
> https://github.com/xwiki/xwiki-platform/blob/40cf4cf65e73728d53ee30ffcabd1534640dc9c5/Jenkinsfile#L26
>  
> )
>
> And build() is running Maven on a node() (xwikiBuild() is pipeline library 
> running Maven):
>
> def build(map)
> {
>   node {
> xwikiBuild(map.name) {
> ...
> }
>
>   }
> }
>
>
> In this situation, do you see any reason for Jenkins to delete a workspace 
> on "main" and a reason for each node() call to not request a new workspace? 
> So in short I guess I'm asking for some clarification on when workspaces 
> are initialized.
>
> Thanks!
> -Vincent
>
>
>

-- 
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/e9c23914-c1cc-43db-86b2-e30c06d70583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: "ERROR: missing workspace" and chaining builds

2017-12-19 Thread Reinhold Füreder
Hi Vincent,

does it work most of the times? If so, could it be related to 
https://issues.jenkins-ci.org/browse/JENKINS-27329 “WorkspaceCleanupThread may 
delete workspaces of running jobs”?

HTH Reinhold

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Vincent Massol
Sent: Dienstag, 19. Dezember 2017 14:07
To: Jenkins Users 
Subject: Re: "ERROR: missing workspace" and chaining builds

Could it be that the workspace is deleted once the node() ends and that it 
happens that some other node() calls happen to run on the same node and that 
Jenkins would allocate a workspace only once per job? That would be strange 
though.

Thanks
-Vincent

On Tuesday, December 19, 2017 at 2:01:32 PM UTC+1, Vincent Massol wrote:
Hi guys,

I regularly get the following errors in our Jenkins pipeline on XWiki:

ERROR: missing workspace 
/home/hudsonagent/jenkins_root/workspace/XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA
 on agent-2-1

[main] Caused by: java.io.IOException: 
/home/hudsonagent/jenkins_root/workspace/XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki
 doesn't exist.

Our Jenkins file does this:

stage ('Platform Builds') {
  parallel(
'main': {
  build(
name: 'Main',
goals: 'clean deploy',
profiles: 'legacy,integration-tests,office-tests,snapshotModules',
properties: '-Dxwiki.checkstyle.skip=true 
-Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
  )
  build(
name: 'Distribution',
goals: 'clean deploy',
profiles: 'legacy,integration-tests,office-tests,snapshotModules',
pom: 'xwiki-platform-distribution/pom.xml'
  )
  build(), ...
  }, ...

(Full file here: 
https://github.com/xwiki/xwiki-platform/blob/40cf4cf65e73728d53ee30ffcabd1534640dc9c5/Jenkinsfile#L26
 )

And build() is running Maven on a node() (xwikiBuild() is pipeline library 
running Maven):

def build(map)
{
  node {
xwikiBuild(map.name) {
...
}

  }
}

In this situation, do you see any reason for Jenkins to delete a workspace on 
"main" and a reason for each node() call to not request a new workspace? So in 
short I guess I'm asking for some clarification on when workspaces are 
initialized.

Thanks!
-Vincent


--
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/e9c23914-c1cc-43db-86b2-e30c06d70583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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/AM4P190MB00678115CADD952751D58990F70F0%40AM4P190MB0067.EURP190.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.


"ERROR: missing workspace" and chaining builds

2017-12-19 Thread Vincent Massol
Hi guys,

I regularly get the following errors in our Jenkins pipeline on XWiki:

ERROR: missing workspace /home/hudsonagent/jenkins_root/workspace/
XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA
 
on agent-2-1

[main] Caused by: java.io.IOException: /home/hudsonagent/jenkins_root/
workspace/XWiki_xwiki-platform_master-
ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/
xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-
flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki 
doesn't exist.

Our Jenkins file does this:

stage ('Platform Builds') {
  parallel(
'main': {
  build(
name: 'Main',
goals: 'clean deploy',
profiles: 'legacy,integration-tests,office-tests,snapshotModules',
properties: '-Dxwiki.checkstyle.skip=true 
-Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
  )
  build(
name: 'Distribution',
goals: 'clean deploy',
profiles: 'legacy,integration-tests,office-tests,snapshotModules',
pom: 'xwiki-platform-distribution/pom.xml'
  )
  build(), ...
  }, ...

(Full file 
here: 
https://github.com/xwiki/xwiki-platform/blob/40cf4cf65e73728d53ee30ffcabd1534640dc9c5/Jenkinsfile#L26
 
)

And build() is running Maven on a node() (xwikiBuild() is pipeline library 
running Maven):

def build(map)
{
  node {
xwikiBuild(map.name) {
...
}

  }
}


In this situation, do you see any reason for Jenkins to delete a workspace 
on "main" and a reason for each node() call to not request a new workspace? 
So in short I guess I'm asking for some clarification on when workspaces 
are initialized.

Thanks!
-Vincent


-- 
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/f86b156f-9126-4f78-becd-79cab6a28c55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Alternate workspace with concurrent builds disabled, why?

2017-12-19 Thread Simon Richter
Hi,

I have a matrix project, with the toplevel project tied to master and
the individual builds selecting agents by label, plus other axes:

 - cpu = (arm64, amd64, x86)
 - build = (debug, release)
 - compiler = (msvc)

where "msvc" is an agent label.

The project does no allow concurrent execution, but I see some of the
builds executing in an @2 workspace -- either all six of them, or one in
the primary workspace and five others in the @2.

The agent uses "-Dhudson.util.ProcessTree.disable=true" to allow
pdbsrv.exe to continue running after a build exits, to avoid parallel
builds terminating with an RPC error.

How can I find out why Jenkins decides to create a new workspace?

   Simon

-- 
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/819baa99-80c2-2129-381f-414b1da9e3be%40hogyros.de.
For more options, visit https://groups.google.com/d/optout.