[JIRA] (JENKINS-56500) Declarative pipeline restricted in code size

2020-05-06 Thread 'mbrun...@eidosmontreal.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton edited a comment on  JENKINS-56500  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Declarative pipeline restricted in code size   
 

  
 
 
 
 

 
 I ran some tests with a fresh bare-bones script and a fresh Jenkins, both with and without the feature flag. With the flag on, I do indeed get a few more stages before I hit the error.This is a typical stage, and I'm able to get 27 in parallel without the flag. With the flag, I can get somewhere between 30 and 35 stages.  {code:java}def call(){   pipeline   { agent any stages{   stage('Build')   { parallel {...stage('Parallel Stage 35'){ when {_expression_ {true}}stages { stage('35-A'){when { anyOf{ _expression_ { true } not { _expression_ { true } }} } steps{ testMethod('TEST') } } stage('35-B') { options { timeout(time: 1, unit: 'HOURS') }when { anyOf { _expression_ { true } not { _expression_ { true } } } } steps { testMethod('TEST') } } } }{code}The call to testMethod is just another file under vars:{code:java}// vars/testMethod.groovydef call(String testInput){def testVariable}{code}  I get a similar result when I move the pipeline into the Jenkinsfile    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





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

[JIRA] (JENKINS-56500) Declarative pipeline restricted in code size

2020-05-06 Thread 'mbrun...@eidosmontreal.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton commented on  JENKINS-56500  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Declarative pipeline restricted in code size   
 

  
 
 
 
 

 
 I ran some tests with a fresh bare-bones script and a fresh Jenkins, both with and without the feature flag. With the flag on, I do indeed get a few more stages before I hit the error. This is a typical stage, and I'm able to get 27 in parallel without the flag. With the flag, I can get somewhere between 30 and 35 stages. 

 

def call()
{ 
  pipeline 
  { 
agent any 
stages
{ 
  stage('Build') 
  { 
parallel 
{

...

stage('Parallel Stage 35')
{ 
when {_expression_ {true}}
stages { 
stage('35-A')
{
when 
{ 
anyOf
{ 
_expression_ { true } 
not { _expression_ { true } }
} 
} 
steps
{ 
testMethod('TEST') 
} 
} 
stage('35-B') 
{ 
options { timeout(time: 1, unit: 'HOURS') }
when 
{ 
anyOf 
{ 
_expression_ { true } 
not { _expression_ { true } } 
} 
} 
steps 
{ 
testMethod('TEST') 
} 
} 
} 
} 

 The call to testMethod is just another file under vars: 

 

// vars/testMethod.groovy

def call(String testInput)
{
def testVariable
}
 

    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 
   

[JIRA] (JENKINS-56500) Declarative pipeline restricted in code size

2020-05-06 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton commented on  JENKINS-56500  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Declarative pipeline restricted in code size   
 

  
 
 
 
 

 
 Liam Newman Yes, I have the feature flag turned on. I also got rid of all def variables outside of the pipeline directive, and I even got rid of all script blocks inside just in case. We do run inside a shared library method, however. Our pipeline is version controlled separately. I see now that this could be the reason why the feature flag workaround isn't working.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.198107.1552302995000.22585.1588768800345%40Atlassian.JIRA.


[JIRA] (JENKINS-56500) Declarative pipeline restricted in code size

2020-05-06 Thread 'mbrun...@eidosmontreal.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton edited a comment on  JENKINS-56500  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Declarative pipeline restricted in code size   
 

  
 
 
 
 

 
 [~bitwiseman]Yes, I have the feature flag turned on. I also got rid of all def variables outside of the pipeline directive, and I even got rid of all script blocks inside just in case.We do run inside a shared library method, however. Our pipeline is version controlled separately. I see now that this could be the reason why the feature flag workaround isn't working. I tried copying the pipeline directive into the Jenkinsfile so the only thing outside of the pipeline is the " @ Library ( ) _ " . I still get the error.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.198107.1552302995000.22649.1588772580396%40Atlassian.JIRA.


[JIRA] (JENKINS-56500) Declarative pipeline restricted in code size

2020-05-05 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton commented on  JENKINS-56500  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Declarative pipeline restricted in code size   
 

  
 
 
 
 

 
 Liam Newman  We have also been running into the method code too large. I was able to get a workaround by switching to a hybrid scripted/declarative, but have been trying various things to get back to declarative. I've tried various methods, including having everything under vars, a mixture of vars and src, and playing around with the various classes we have. Eventually I commented out chunks of code until the pipeline stopped giving "method code too large" and then started adding stuff back. I think I've narrowed it down to the "when {}" stage conditionals. I'm currently using 25 parallel stages (each one has 2 stages, and they are skeletal because of my commented out code) and I've changed all the conditionals to "when { _expression_  {true}  }". Some of our conditionals use anyOf {} and not {}, but I set everything to true in order to rule out the expressions themselves. Without the conditionals, there is no "method code too large" error. When I add back the conditionals, the error returns.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.198107.1552302995000.22181.1588709700393%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-19 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton commented on  JENKINS-60479  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
 Thanks for looking into this. I wasn't sure which plugin was causing the issue, it's possible that it's either the p4-plugin or something overlooked when pipeline-model-definition-plugin was updated.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.13740.1576764660288%40Atlassian.JIRA.


[JIRA] (JENKINS-60532) Build fails, but all stages and steps show successful when using nunit plugin and the test file doesn't exist

2019-12-18 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60532  
 
 
  Build fails, but all stages and steps show successful when using nunit plugin and the test file doesn't exist   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Attachments: 
 error-buildstage.PNG, error-stages.PNG, nunit-buildstage.PNG, nunit-stages.PNG  
 
 
Components: 
 nunit-plugin  
 
 
Created: 
 2019-12-18 17:47  
 
 
Environment: 
 Docker image jenkins/jenkins:2.208 in a docker network with a Perforce instance (https://github.com/p4paul/helix-docker) using p4-plugin 1.10.7, nunit-plugin 0.25, and blue-ocean 1.21  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Matthew Brunton  
 

  
 
 
 
 

 
 When using the nunit-plugin, if the test result file is not found, the plugin reports  

 
FATAL: No NUnit test report files were found. Configuration error? 

 The stage is marked as failure, however the build continues with the next stage as if it were a success. At the end, the build is marked as failure. In Blue Ocean, all steps/stages are marked as success, but the build at the end is marked as a failure.   I believe the expected result is that the error from nunit should act like any other error within a step and subsequent stages are skipped.   Output with nunit-plugin with no existing file   

 

[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-17 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton commented on  JENKINS-60479  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
 Thanks for responding. I'll supply screenshots of the setup I'm using to reproduce. I'm also using the Pipeline: Declarative plugin 1.5, which was recently released to add matrix support to declarative pipelines.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.10674.1576609080140%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-17 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60479  
 
 
  Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
Change By: 
 Matthew Brunton  
 
 
Attachment: 
 image-2019-12-17-13-55-17-110.png  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.10671.1576608960240%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-17 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60479  
 
 
  Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
Change By: 
 Matthew Brunton  
 
 
Attachment: 
 image-2019-12-17-13-43-11-090.png  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.10665.1576608240259%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-17 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60479  
 
 
  Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
Change By: 
 Matthew Brunton  
 
 
Attachment: 
 image-2019-12-17-13-41-38-310.png  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.10662.1576608120190%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-17 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60479  
 
 
  Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
Change By: 
 Matthew Brunton  
 
 
Attachment: 
 image-2019-12-17-13-40-13-460.png  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.10659.1576608060213%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-17 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60479  
 
 
  Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
Change By: 
 Matthew Brunton  
 
 
Attachment: 
 image-2019-12-17-13-37-15-881.png  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203564.1576265676000.10656.1576607880310%40Atlassian.JIRA.


[JIRA] (JENKINS-60479) Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run

2019-12-13 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60479  
 
 
  Building a matrix with exclusions in a declarative pipeline using a pipeline library finds no branches to run   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 p4-plugin, pipeline-model-definition-plugin  
 
 
Created: 
 2019-12-13 19:34  
 
 
Environment: 
 Docker image jenkins/jenkins:2.208 in a docker network with a Perforce instance (https://github.com/p4paul/helix-docker) using p4-plugin 1.10.7  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Matthew Brunton  
 

  
 
 
 
 

 
 I have run into an issue when attempting to build a matrix in a declarative pipeline using a pipeline library through p4. If the excludes section is used, the pipeline is run successfully, but it reports that there are no branches to run. Without the excludes section, all targets in the matrix are run.   To reproduce, I created a Perforce instance with Jenkins in a docker network and installed the p4-plugin 1.10.7. I then created a multibranch pipeline with a source of //testDepot/... from perforce. I created two streams and a library stream.   In the first stream, I created a Jenkinsfile: 

 

@Library('test-pipeline') _
lib()
 

 Where the test-pipeline is a pipeline library at //testDepot/libstream/... with the pipeline code in //testDepot/libstream/vars/lib.groovy 

 
def call()
{
  pipeline
  {
  

[JIRA] (JENKINS-60321) Multibranch pipeline with default Jenkinsfile fails when scanning p4 streams

2019-11-28 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60321  
 
 
  Multibranch pipeline with default Jenkinsfile fails when scanning p4 streams   
 

  
 
 
 
 

 
Change By: 
 Matthew Brunton  
 

  
 
 
 
 

 
 When using the *p4* plugin and the *Pipeline:* *Multibranch with defaults* plugin, scanning a multibranch pipeline with a default Jenkinsfile results in a _java.lang.ClassCastException._To reproduce, I used the jenkins/jenkins:2.190.3 docker image of Jenkins with p4-plugin (1.10. 3 7 ) and the Pipeline: Multibranch with defaults plugin (2.1), as well as a clean docker instance of Perforce ([https://github.com/p4paul/helix-docker]). I created a stream depot with a couple of dummy streams to use for tests.I created a new multibranch pipeline, set up the Branch source to be the p4 depot with the dummy streams, and set the Build configuration to use _by default Jenkinsfile._It results in the following output:{code:java}Started by user admin[Thu Nov 28 16:40:12 UTC 2019] Starting branch indexing.. p4 streams //testDepot/... +ERROR: [Thu Nov 28 16:40:12 UTC 2019] Could not fetch branches from source f9f7c9b6-5fe3-4b7b-bec1-b56ed976ef85java.lang.ClassCastException: org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineBranchDefaultsProjectFactory cannot be cast to org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.getLastScan(AbstractP4ScmSource.java:383) at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.getRevision(AbstractP4ScmSource.java:310) at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.retrieve(AbstractP4ScmSource.java:158)Caused: java.io.IOException at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.retrieve(AbstractP4ScmSource.java:194) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:635) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1026) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)[Thu Nov 28 16:40:12 UTC 2019] Finished branch indexing. Indexing took 92 msFATAL: Failed to recompute children of testMultibranchDefaults2java.io.IOException: java.lang.ClassCastException: org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineBranchDefaultsProjectFactory cannot be cast to org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory at org.jenkinsci.plugins.p4.scm.AbstractP4ScmSource.retrieve(AbstractP4ScmSource.java:194) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:635) at 

[JIRA] (JENKINS-60321) Multibranch pipeline with default Jenkinsfile fails when scanning p4 streams

2019-11-28 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60321  
 
 
  Multibranch pipeline with default Jenkinsfile fails when scanning p4 streams   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 p4-plugin  
 
 
Created: 
 2019-11-28 16:48  
 
 
Environment: 
 Docker image jenkins/jenkins:2.190.3 in a docker network with a Perforce instance (https://github.com/p4paul/helix-docker) using p4-plugin 1.10.7 and  Pipeline: Multibranch with defaults 2.1  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 Matthew Brunton  
 

  
 
 
 
 

 
 When using the p4 plugin and the Pipeline: Multibranch with defaults plugin, scanning a multibranch pipeline with a default Jenkinsfile results in a java.lang.ClassCastException. To reproduce, I used the jenkins/jenkins:2.190.3 docker image of Jenkins with p4-plugin (1.10.3) and the Pipeline: Multibranch with defaults plugin (2.1), as well as a clean docker instance of Perforce (https://github.com/p4paul/helix-docker). I created a stream depot with a couple of dummy streams to use for tests. I created a new multibranch pipeline, set up the Branch source to be the p4 depot with the dummy streams, and set the Build configuration to use by default Jenkinsfile. It results in the following output: 

 

Started by user admin
[Thu Nov 28 16:40:12 UTC 2019] Starting branch indexing...
... p4 streams //testDepot/... +ERROR: [Thu Nov 28 16:40:12 UTC 2019] Could not fetch branches from source f9f7c9b6-5fe3-4b7b-bec1-b56ed976ef85
java.lang.ClassCastException: org.jenkinsci.plugins.pipeline.multibranch.defaults.PipelineBranchDefaultsProjectFactory cannot be cast to 

[JIRA] (JENKINS-59484) EXECUTOR_NUMBER is always expanded to '0' in workspace name when checking out with Perforce to a subdirectory

2019-09-23 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton commented on  JENKINS-59484  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: EXECUTOR_NUMBER is always expanded to '0' in workspace name when checking out with Perforce to a subdirectory   
 

  
 
 
 
 

 
 I cleaned the workspaces and then hit 'build' 4 times quickly. Below are the resulting folders: 

 

drwxr-xr-x  3 jenkins jenkins 4096 Sep 23 16:29 testMultibranch_testStream@3
drwxr-xr-x  2 jenkins jenkins 4096 Sep 23 16:29 testMultibranch_testStream@3@tmp
drwxr-xr-x  3 jenkins jenkins 4096 Sep 23 16:29 testMultibranch_testStream@4
drwxr-xr-x  2 jenkins jenkins 4096 Sep 23 16:29 testMultibranch_testStream@4@tmp
-rw-r--r--  1 jenkins jenkins   54 Sep 23 16:29 workspaces.txt
 

 The two builds that should have used testMultibranch_testStream and testMultibranch_testStream@2 failed with an error: 

 

ERROR: P4: Task Exception: hudson.AbortException: P4JAVA: Error(s):
Path '/var/jenkins_home/workspace/testMultibranch_testStream/test/...' is not under client's root '/var/jenkins_home/workspace/testMultibranch_testStream%403/test'.
 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 
 

[JIRA] (JENKINS-59484) EXECUTOR_NUMBER is always expanded to '0' in workspace name when checking out with Perforce to a subdirectory

2019-09-23 Thread mbrun...@eidosmontreal.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Matthew Brunton created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-59484  
 
 
  EXECUTOR_NUMBER is always expanded to '0' in workspace name when checking out with Perforce to a subdirectory   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 p4-plugin  
 
 
Created: 
 2019-09-23 13:08  
 
 
Environment: 
 Docker image jenkins/jenkins:2.176.3 in a docker network with a Perforce instance (https://github.com/p4paul/helix-docker) using p4-plugin 1.10.3  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 Matthew Brunton  
 

  
 
 
 
 

 
 When using the p4 plugin to checkout to a subdirectory, EXECUTOR_NUMBER is always expanded in the Perforce workspace name to be '0'. This messes up concurrent builds that rely on the Perforce workspace root since each subsequent build uses the same workspace and overwrites the root directory. When not checking out to a subdirectory, the executor number is expanded correctly. It still doesn't match up with the result of 'echo ${EXECUTOR_NUMBER}', but at least multiple builds aren't clashing workspaces with each other. This occurs both when using 'checkoutToSubdirectory' under options as well as manually specifying a dir() step with 'checkout scm' under it.   To reproduce, I used the jenkins/jenkins:2.176.3 docker image of Jenkins (I was able to reproduce it on 2.150.3, 2.164.3, and 2.176.3) with p4-plugin 1.10.3 as well as a clean docker instance of Perforce (https://github.com/p4paul/helix-docker). I created a stream depot with a dummy stream to use for tests. The workspace name format is still the default jenkins-${NODE_NAME}${JOB_NAME}${EXECUTOR_NUMBER} I have been able to reproduce it by starting several concurrent builds on the same node (I tried both the master node and a slave node) and the following Jenkinsfiles: