[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-03-19 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I my case I can, and the plugin works too. I'm running 2.32.2 LTS with 'stable' plugins up to date, and has been working like that (with scripts from SCM too) for months now. I hope it will stay the same in next releases ! (I stay on LTS, so I don't know for weekly)      
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-03-19 Thread liranvak...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liran Vaknin commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 squalou jenkins, It seems that scripts that are being checked out via SCM cannot be approved (Run out of sandbox).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-03-18 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 You can simply approve the script, can't you ? it's a one time click per jenkins instance, so if you have only a few, it's sort of ok. OR : the solution I adopted is to use plugin that allows all scripts.  ( permissive-security-script plugin )It has a minor drawback : it's too verbose when it logs that it allowed a script. But works fine. (see https://issues.jenkins-ci.org/browse/JENKINS-42192)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-03-15 Thread phil.mcar...@cloudgine.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Phil McArdle commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Liran Vaknin, I'm not sure how to disable the groovy sandbox for scripts loaded from SCM, if you can, but you can alternatively add a function to the pipeline shared library to call the function for you. e.g. https://jenkins.io/doc/book/pipeline/shared-libraries/#defining-steps 

 

// vars/getEnvironmentWrapper.groovy
def call(String variableName) {
return currentBuild.rawBuild.getEnvironment()[variableName]
}
 

 rawBuild isn't serializable, but you should get away with that in a standalone function. I can't say for sure because I have my helper function written into a larger class.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-03-15 Thread phil.mcar...@cloudgine.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Phil McArdle edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Liran Vaknin [~liranv] , I'm not sure how to disable the groovy sandbox for scripts loaded from SCM, if you can, but you can alternatively add a function to the [pipeline shared library|https://jenkins.io/doc/book/pipeline/shared-libraries/] to call the function for you.e.g.https://jenkins.io/doc/book/pipeline/shared-libraries/#defining-steps{code:java}// vars/getEnvironmentWrapper.groovydef call(String variableName) {return currentBuild.rawBuild.getEnvironment()[variableName]}{code}rawBuild isn't serializable, but you should get away with that in a standalone function. I can't say for sure because I have my helper function written into a larger class.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-03-15 Thread liranvak...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Liran Vaknin commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Hi, I'm experiencing the same behavior as the OP (P4_CHANGELIST is not defined). When I tried to use the suggested workaround: currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"], I got the following error message: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper getRawBuild I checkout the pipeline script with SCM.   Any other way I can get this working in the meantime?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-25 Thread phil.mcar...@cloudgine.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Phil McArdle commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 For what it's worth, I just hit this. I get null unless I use the rawBuild workaround. Jenkins LTS ver. 2.32.1 p4-plugin 1.4.13 Jenkins is running on Debian 8.4, the slave that Jenkins chose for the job was Debian 8.6 Same behaviour when triggered by polling or manually.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-13 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Hey,GREAT workaround ! works for me too.for your curiosity : I'l using a plain war of jenkins inside a tomcat-8 on my  windows 7  laptop, and also some init.d-style service installations under redhat  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-13 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Hey, GREAT workaround ! works for me too. for your curiosity : I'l using a plain war of jenkins inside a tomcat-8 on my laptop, and also some init.d-style service installations under redhat  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread cedric.perth...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Cedric Perthuis commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Out of curiosity, are you using an alpine or a libc distribution? docker or native? I am reproducing the issue with alpine/docker. The currentBuild.getRawBuild().getEnvironment()["P4_PORT" / "P4_USER" / "P4_CHANGELIST"] workaround works for me and allowed me to setup a fairly complex job with several external p4 operations done in python scripts.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I've tried something funny before the checkout{code}println env.JOB_NAME{code}... makes it fail again.I even tried to iterate over env.getEnvironnment() *before* the checkout, to be sure not to call a null thing : nope, P4_whetever is not filled *after* the checkout.Really weird.env.getOveridenEnvironnment itself is always empty.My problem is that because of this : access to P4 variables are not reliable, so not usable :- if I *define workspace using env.JOB_NAME* (or any env) : it make things fail ! it's a very common usecase- if I chain 2 syncs in a pipeline, and between I use the P4_CHANGELIST : I'm probably doomed- if I call whatever env variable before I sync, I' doomed- if a shared lib I use do use any env variable before I sync : doomed againnote that it happens with *all* P4 env variables, not only  p4_CHANGLIST  p4_CHANGELIST   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I've tried something funny before the checkout{code}println env.JOB_NAME{code}... makes it fail again.I even tried to iterate over env.getEnvironnment() *before* the checkout, to be sure not to call a null thing : nope, P4_whetever is not filled *after* the checkout.Really weird.env.getOveridenEnvironnment itself is always empty.My problem is that because of this : access to P4 variables are not reliable, so not usable :  - if I  *define workspace using env.JOB_NAME* (or any env) : it make things fail ! it's a very common usecase- if I  chain 2 syncs in a pipeline, and between I use the P4_CHANGELIST : I'm probably doomed- if I call whatever env variable before I sync, I' doomed- if a shared lib I use do use any env variable before I sync : doomed againnote that it happens with *all* P4 env variables, not only p4_CHANGLIST  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I've tried something funny before the checkout 

 

println env.JOB_NAME
 

 ... makes it fail again. I even tried to iterate over env.getEnvironnment() before the checkout, to be sure not to call a null thing : nope, P4_whetever is not filled after the checkout. Really weird. env.getOveridenEnvironnment itself is always empty. My problem is that because of this : access to P4 variables are not reliable, so not usable : 
 
if I chain 2 syncs in a pipeline, and between I use the P4_CHANGELIST : I'm probably doomed 
if I call whatever env variable before I sync, I' doomed 
if a shared lib I use do use any env variable before I sync : doomed again 
 note that it happens with all P4 env variables, not only p4_CHANGLIST  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop 

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 - I tried, still failing.(to be honest I first tried without, and added it after to check)I also tried several 'p4 sync' implementation, populate have list or not, using groovy sandbox or not : same result. -  I tried on another machine : it works when removing the println.It's weird. On the one it failed, there must be something in the way.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 -I tried, still failing. -  - (to be honest I first tried without, and added it after to check) -  - I also tried several 'p4 sync' implementation, populate have list or not, using groovy sandbox or not : same result.-I tried on another machine : it works when removing the println.It's weird. On the one it failed, there must be something in the way.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I tried, still failing. (to be honest I first tried without, and added it after to check) I also tried several 'p4 sync' implementation, populate have list or not, using groovy sandbox or not : same result.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Try removing the first  

 
println env.P4_CHANGELIST 

  as this is defining a 'null' entry, before the variable is used and the environment is not overriding it. This looks like a Jenkins Core bug as I just extend the environment.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2017-01-12 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Update using 2.32.1, p4 plugin 1.4.12, all on a windows laptop, fresh install, still doesn't work here's the pipeline snippet and the output 

 

	node('master'){
	println env.P4_CHANGELIST
	def populateClassName = 'SyncOnlyImpl'
	def p4ws='squalou-test-hell'
def viewMapping='''//depot/project/pom.xml //squalou-test-hell/project/pom.xml'''
	
	checkout([$class: 'PerforceScm', credential: 'PERFORCE-READONLY',
		populate: [$class: populateClassName, have: false, quiet: true],
		workspace: [
			$class: 'ManualWorkspaceImpl',
			name: p4ws,
			spec: [view: viewMapping]
		]
	])
	
	println env.P4_CHANGELIST
	}
 

 output 

 

Running on master in C:\Users\squalou\.jenkins\workspace\p4Hell
[Pipeline] {
[Pipeline] echo
null
[Pipeline] checkout
... p4 client -o squalou-test-hell
 +
... p4 info
 +
... p4 client -o squalou-test-hell
 +
... p4 client -i
 +
... client: squalou-test-hell
... p4 client -o squalou-test-hell
 +
... p4 info
 +
... p4 counter change
 +

... p4 changes -m1 -ssubmitted //squalou-test-hell/...
 +

Change 3832207 on 2017/01/06 by someone@something '  tadada'
Building on Node: master

... p4 client -o squalou-test-hell
 +
... p4 info
 +

P4 Task: establishing connection.
... server: perforce:1666
... node: SQUALOU

P4 Task: syncing files at change: 3832207

... p4 sync -p -q C:\Users\squalou\.jenkins\workspace\p4Hell/...@3832207
 +
duration: (209ms)

P4 Task: saving built changes.
Found last change 3832207 on syncID squalou-test-hell

... p4 client -o squalou-test-hell
 +
... p4 info
 +

... p4 client -o squalou-test-hell
 +

... p4 info
 +
... done

[Pipeline] echo
null
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-24 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I'm running Jenkins 2.19.4 on a redhat 7.2 and java8 The slaves on which I ran the job are either redhat 7.2, or 6.4, no idea if it could affect the result. (yet note that the slave is not on the same host as the master) build is triggered manually for now  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-23 Thread kwi...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Wirth commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 It's the summary page of the job. Usually 'Status' on the left hand side. However based on the output above I think the answer is 'yes' and it includes '3798904'. Can you please post your Jenkins server version, OS the build job and server are on and how you are triggering the build (for example Perforce trigger, polling, Swarm review) and I'll try and reproduce the problem when I return to the office after the holiday break (if it hasn't been solved by others in the meantime).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-23 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I copy / pasted you snippet, still getting 'null'. Changed the sync'd path to be sure somehting was done, tried again, I have lots of output too... but still null . What do you mean by 'status page' ? 

 
P4 Task: reverting all pending and shelved revisions.
... p4 revert /data/jenkins/slave/workspace/testNewP4/... +
... rm [abandoned files]
duration: (11ms)

P4 Task: cleaning workspace to match have list.
... p4 reconcile -w -f /data/jenkins/slave/workspace/testNewP4/... +
duration: (18ms)

P4 Task: syncing files at change: 389
... p4 sync /data/jenkins/slave/workspace/testNewP4/...@389 +
duration: (147ms)

P4 Task: saving built changes.
Found last change 3769363 on syncID jenkins-NODE_NAME-testNewP4
... p4 client -o jenkins-master-testNewP4 +
... p4 info +
... p4 changes //jenkins-master-testNewP4/...@3769363,389 +
... p4 user -o xx+
... p4 describe -s 389 +
... p4 fixes -c389 +
... p4 changes -l -m1 @3799947 +
... p4 user -o xx+
... p4 describe -s 3799947 +
... p4 fixes -c3799947 +
... p4 changes -l -m1 @3798904 +
--%< snip snip --%<--
... done

[Pipeline] echo
null
[Pipeline] }
[Pipeline] // node
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-23 Thread kwi...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Wirth commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 This is the example that works for me on Jenkins 2.19.4 in a 'pipeline' job: 

 

node {
   stage 'Stage 1'
   echo 'Hello World 1'
   
   p4sync charset: 'none',
	 credential: 'localhost',
	 depotPath: '//depot/pipelinetrig',
	 populate: 
		[
		 $class: 'AutoCleanImpl',
		 delete: true,
		 modtime: false,
		 parallel: 
			[
			 enable: false,
			 minbytes: '1024',
			 minfiles: '1',
			 path: '/usr/local/bin/p4',
			 threads: '4'
			],
		 pin: '',
		 quiet: false,
		 replace: true
		]
		
		println env.P4_CHANGELIST
	
}
 

 This returns: 

 

...cut...
P4 Task: saving built changes.
Found last change 715 on syncID jenkins-NODE_NAME-Localhost-Pipeline-Triggered
... p4 client -o jenkins-master-Localhost-Pipeline-Triggered +
... p4 info +
... p4 changes //jenkins-master-Localhost-Pipeline-Triggered/...@715,716 +
... p4 changes -l -m1 @716 +
... p4 user -o super +
... p4 describe -s 716 +
... p4 fixes -c716 +
... done

[Pipeline] echo
716
 

 Note that my output had a lot more information. Was there a built changelist reported on the status page?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-23 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins reopened an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 squalou jenkins  
 
 
Resolution: 
 Fixed  
 
 
Status: 
 Closed Reopened  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-23 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Does this really work for anyone ?Personally  with p4 plugin v1.4.12  I get a 'null' when trying this :{code}  stage ('sync'){   node ('myNode'){def p4ws='myMaster-${JOB_NAME}'def p4vmap='//depot/'+BRANCH+'/.ci/jenkins/... //'+p4ws+'/...' def populateClassName = 'ForceCleanImpl' checkout([$class: 'PerforceScm', credential: 'PERFORCE-READONLY',  populate: [$class: populateClassName, have: true, quiet: true],  workspace: [   $class: 'ManualWorkspaceImpl',   name: p4ws,   spec: [view: p4vmap, allwrite: false]  ] ])   println env.P4_CHANGELIST   }  }{code}{noformat}P4 Task: saving built changes p4 client -o ci-mx-test-p4web-testNewP4 +... p4 info +... done[Pipeline] echonull{noformat}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-12-23 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Does this really work for anyone ? Personally I get a 'null' when trying this : 

 

  stage ('sync'){
   node ('myNode'){

def p4ws='myMaster-${JOB_NAME}'
def p4vmap='//depot/'+BRANCH+'/.ci/jenkins/... //'+p4ws+'/...'

	def populateClassName = 'ForceCleanImpl'

	checkout([$class: 'PerforceScm', credential: 'PERFORCE-READONLY',
		populate: [$class: populateClassName, have: true, quiet: true],
		workspace: [
			$class: 'ManualWorkspaceImpl',
			name: p4ws,
			spec: [view: p4vmap, allwrite: false]
		]
	])
   
println env.P4_CHANGELIST
 
  
}
  }
 

 

 
P4 Task: saving built changes.
... p4 client -o ci-mx-test-p4web-testNewP4 +
... p4 info +
... done

[Pipeline] echo
null
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop 

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Code changed in jenkins User: Paul Allen Path: SETUP.md http://jenkins-ci.org/commit/p4-plugin/a26323ecd4be72301a180bc03ae84d7f86c4d7ae Log: Update documentation for new P4_CHANGELIST behavior (karl_wirth) JENKINS-37584  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Yes I think that is the issue, another user spotted the use of getAction vs getActions  it  in a different area:https://github.com/jenkinsci/p4-plugin/pull/32  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Yes I think that is the issue, another user spotted the use of getAction vs getActions it in a different area: https://github.com/jenkinsci/p4-plugin/pull/32  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread morne.joub...@u-blox.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Morne Joubert commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I "think" I can see the problem. The extention that Paul added to set the env has 

 



@Override
 public void buildEnvironmentFor(Run run, EnvVars env, TaskListener listener) throws IOException, InterruptedException {
  TagAction tagAction = run.getAction(TagAction.class);

  if(tagAction == null) {
   return;
  }

  // Set P4_CHANGELIST value
  if (tagAction.getBuildChange() != null) {
   String change = tagAction.getBuildChange().toString();
   env.put("P4_CHANGELIST", change);
  }

 

 From http://javadoc.jenkins-ci.org/hudson/model/Actionable.html#getAction(java.lang.Class) public  T getAction(Class type) Gets the action first instance to be found of a specified type that contributed to this build. So my guess is that the code get the first P4Action every time, and I think we want the last ? There is an API to pull all Actions of a particular type 

 

public extends Action> List getActions(Class type)
 

 I would suggest we try that and see if it works if we used the last one in the list.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
  

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread jeroen.bog...@tomtom.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jeroen Bogers edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 [~mornejoubert], it happens there too.What I ran to test it (anonymized and abbreviated):{noformat}node {echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]checkout poll: false, scm: [$class: 'PerforceScm', credential: '123XYZ', populate: [...], workspace: [...]echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]}node {echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]checkout poll: false, scm: [$class: 'PerforceScm', credential: '123XYZ', populate: [...], workspace: [...]echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]}{noformat}In the example above I use two different workspaces (on different depots, but the same perforce server).The relevant output I see is:{noformat}currentBuild P4_CHANGELIST: null...P4 Task: syncing files at change: 2498817...currentBuild P4_CHANGELIST: 2498817currentBuild P4_CHANGELIST: 2498817...P4 Task: syncing files at change: 2465266...currentBuild P4_CHANGELIST: 2498817{noformat}So even for that access method, the environment is locked to the first value  is  it  'sees'.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails 

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread jeroen.bog...@tomtom.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jeroen Bogers commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Morne Joubert, it happens there too. What I ran to test it (anonymized and abbreviated): 

 
node {
echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]

checkout poll: false, scm: [$class: 'PerforceScm', credential: '123XYZ', populate: [...], workspace: [...]

echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]
}

node {
echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]

checkout poll: false, scm: [$class: 'PerforceScm', credential: '123XYZ', populate: [...], workspace: [...]

echo "currentBuild P4_CHANGELIST: " + currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]
}
 

 In the example above I use two different workspaces (on different depots, but the same perforce server). The relevant output I see is: 

 
currentBuild P4_CHANGELIST: null
...
P4 Task: syncing files at change: 2498817
...
currentBuild P4_CHANGELIST: 2498817

currentBuild P4_CHANGELIST: 2498817
...
P4 Task: syncing files at change: 2465266
...
currentBuild P4_CHANGELIST: 2498817
 

 So even for that access method, the environment is locked to the first value is 'sees'.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 
   

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread morne.joub...@u-blox.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Morne Joubert commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Jeroen, does this also happen if you do  echo currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"] ?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread jeroen.bog...@tomtom.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jeroen Bogers commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 We just tried using the environment variables, but found that if you do multiple checkouts in a single pipeline, the env is locked to the first checkout. Or, to be more precise, if you set any of the P4_* environment variables to any arbitrary value the variable is no longer updated by any future p4 actions. For example, if you do: 

 
env.P4_CHANGELIST="myOwnValue"
checkout scm: [$class: 'PerforceScm', credential: 'XXX', populate: ... (etc, etc)
echo env.P4_CHANGELIST
 

 You will see that the output shows 'myOwnValue' and not a changelist number as expected. This prevents creating a pipeline that does actions on multiple depots in our case.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen edited a comment on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Thank you for the details; I had seen your comment in the Swarm change, but hadn't had time to try it.  The  ` $ \ {env.P4_CHANGELIST \ } `  is used in the unit tests and seems ok, it could be Pipeline versions, but we did test a few combinations.  Perhaps it is an assignment or scope issue?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Thank you for the details; I had seen your comment in the Swarm change, but hadn't had time to try it. The `$ {env.P4_CHANGELIST} ` is used in the unit tests and seems ok, it could be Pipeline versions, but we did test a few combinations. Perhaps it is an assignment or scope issue?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-29 Thread morne.joub...@u-blox.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Morne Joubert commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 The $ {env.P4_CHANGELIST}  is not working for us but the following is currentBuild.getRawBuild().getEnvironment()["P4_CHANGELIST"]  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 thank you !  and sorry,really, I wrote my comment before seeing you were about to update the doc. I didn't meant to sound rude or impolite.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 The builtin help has some tips: http:///job//pipeline-syntax/globals  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Granted I need to update the P4 docs, but it is: 

 

${env.P4_CHANGELIST}
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I fear I need a clue as how to make it work. just updated the plugin 1.4.10, tried a sync, and println "$ {P4_CHANGELIST} " did fail (same result with any flavor of ceho, println, double quote, songle quote, $, culry braces or not ...) I'm probably missing something  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 squalou jenkins  
 

  
 
 
 
 

 
 I'm using p4 plugin for several months in freestyle jobs, and I'm moving to 'pipelines' implementation (workflow if you like)According to this documentation, there are some known limitations :https://github.com/jenkinsci/ pipeline p4 -plugin/blob/master/ README SETUP .mdespecially : {quote}No access to Environment $\{VAR\} variables{quote}On the other hand, one line below is written :Exposed Variables :- *P4_CHANGELIST* - current changelist (valid for this to be blank when there are no changes).Within my pipelines, what I see is that 'P4_CHANGELIST' is not available after a call to p4sync.Is it expected ?If so, how do I retrieve the changelist at which the sync is done ? (in order to propagate it to further steps and stages in the pipeline)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this 

[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Thanks for reminding me. I'll need to update the docs to reflect the changes in 1.4.10.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-28 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen closed an issue as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Released in 1.4.10  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 Paul Allen  
 
 
Status: 
 Resolved Closed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-23 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen updated  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Ready for release  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 Paul Allen  
 
 
Status: 
 In Review Resolved  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-23 Thread pal...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Paul Allen updated  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 Paul Allen  
 
 
Status: 
 In  Progress  Review  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-15 Thread pete.mc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Pete McNab commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I'd add another note that in my opinion in the case where a job does multiple syncs/polls, P4_CHANGELIST should contain a deduplicated list of all the changes detected.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-11-15 Thread pete.mc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Pete McNab commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 My pipeline has lots of syncs that happen, and I'd also like to see this kind of behavior. Taken a step further though, I'd like to be able to access detected changelists on a per-sync basis.  If I use the polling option of the checkout method, I'd want to be able to access the list of detected changelists. Preferably, I'd either be able to specify the target environment variable for each poll, or have it named based on the client name doing the polling. To give more details of my use case, a typical pipeline script would compile multiple targets on multiple platforms. Each target/platform combination can have different sources. I want to be able to skip target/platform combinations if there are no changes to that specific view.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-10-25 Thread morne.joub...@u-blox.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Morne Joubert commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 I also need this, without the knowledge of what number was synced i cannot migrate to pipelines.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-10-13 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 small additional comment : using the change number to set the build name is also something we enjoy. Doing so from inside a pipeline would be great. (easy to do as long as the change number is available in a variable somehow)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-10-13 Thread kwi...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Wirth assigned an issue to Karl Wirth  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 Karl Wirth  
 
 
Assignee: 
 Karl Wirth  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-10-13 Thread kwi...@perforce.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Karl Wirth started work on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Karl Wirth  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-09-07 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins commented on  JENKINS-37584  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
 Additionally : setting the 'change' variable in a pipeline seem to have no effect either. I've tried to set the 'pin' value to a changelist, and apparently it works but I'm not sure it's a recommended use. So to be more precise on the needs here : 
 
in a pipeline 
have a first sync 'at head', get somehow the changelist at which the effective sync is done 
then in other stages, have other sync done at this very same changelist 
  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-09-07 Thread phvian...@googlemail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 p v updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Change By: 
 p v  
 
 
Flagged: 
 Impediment  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





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


[JIRA] (JENKINS-37584) P4 plugin : P4_CHANGELIST not available in workflow (pipeline)

2016-08-22 Thread squalou.jenk...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 squalou jenkins created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-37584  
 
 
  P4 plugin : P4_CHANGELIST not available in workflow (pipeline)   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 p4-plugin  
 
 
Created: 
 2016/Aug/22 10:14 AM  
 
 
Environment: 
 jenkins 2.7.2 LTS  p4-plgin 1.3.8  jdk 1.8 (sun)  OS : redhat 7.2  
 
 
Priority: 
  Major  
 
 
Reporter: 
 squalou jenkins  
 

  
 
 
 
 

 
 I'm using p4 plugin for several months in freestyle jobs, and I'm moving to 'pipelines' implementation (workflow if you like) According to this documentation, there are some known limitations : https://github.com/jenkinsci/pipeline-plugin/blob/master/README.md especially : 

No access to Environment ${VAR} variables
 On the other hand, one line below is written : Exposed Variables : 
 
P4_CHANGELIST - current changelist (valid for this to be blank when there are no changes). 
 Within my pipelines, what I see is that 'P4_CHANGELIST' is not available after a call to p4sync. Is it expected ? If so, how do I retrieve the changelist at which the sync is done ? (in order to propagate it to further steps and stages in the pipeline)