[JIRA] (JENKINS-44191) Declarative Pipeline can't check out SCM code on Agent

2018-03-20 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-44191  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Declarative Pipeline can't check out SCM code on Agent   
 

  
 
 
 
 

 
 Jesse Glick: No idea whether that's the same bug, but I've noticed the line "agent none" in a stage randomly throwing MissingPropertyException after installing BlueOcean and that sounds related. Does BlueOcean interfere with the pipeline in any way?  
 

  
 
 
 
 

 
 
 

 
 
 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-50242) withCredentials step masking easily bypassed

2018-03-21 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-50242  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: withCredentials step masking easily bypassed   
 

  
 
 
 
 

 
 You don't have to move the whole pipeline out of the repository. After all, you can call other parameterized jobs via build() from your pipeline. You just have to make sure that the credentials are not available in the multibranch pipeline folder.  
 

  
 
 
 
 

 
 
 

 
 
 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-41239) Error during always block skips execution of remaining steps

2018-03-21 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-41239  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Error during always block skips execution of remaining steps   
 

  
 
 
 
 

 
 The workaround mentioned here doesn't work for me. Are there any plans to address this issue? Currently, I have to use  

 
post { always { catchError { ... } cleanWs() } } 

  everywhere to make sure I always clean up my workspaces. This workaround introduces another bug, though: Incorrect archiveArtifacts configurations in the catchError block will be completely ignored.  
 

  
 
 
 
 

 
 
 

 
 
 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-41239) Error during always block skips execution of remaining steps

2018-03-21 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann edited a comment on  JENKINS-41239  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Error during always block skips execution of remaining steps   
 

  
 
 
 
 

 
 When I discovered this problem, my first instinct was to add a second _always_ closure, but  this failed  Jenkins didn't accept that . Maybe allowing this would be a good solution to the underlying problem?  
 

  
 
 
 
 

 
 
 

 
 
 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-41239) Error during always block skips execution of remaining steps

2018-03-21 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-41239  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Error during always block skips execution of remaining steps   
 

  
 
 
 
 

 
 When I discovered this problem, my first instinct was to add a second always closure, but this failed. Maybe allowing this would be a good solution to the underlying problem?  
 

  
 
 
 
 

 
 
 

 
 
 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-41239) Error during always block skips execution of remaining steps

2018-03-21 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann edited a comment on  JENKINS-41239  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Error during always block skips execution of remaining steps   
 

  
 
 
 
 

 
 When I discovered this problem, my first instinct was to add a second _always_ closure, but Jenkins didn't accept that. Maybe allowing this would be a good solution to the underlying problem? *Edit*: Sorry, completely missed that this is already mentioned above.  
 

  
 
 
 
 

 
 
 

 
 
 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-50337) BlueOcean does not show steps after a parallel step inside a script block

2018-03-22 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50337  
 
 
  BlueOcean does not show steps after a parallel step inside a script block   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 blueocean-plugin  
 
 
Created: 
 2018-03-22 11:28  
 
 
Environment: 
 Jenkins 2.107.1  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Moritz Baumann  
 

  
 
 
 
 

 
 I'm using a mostly declarative pipeline. In one of the stages, I have to dynamically spawn parallel stages based on the result of a command: 

 

def getParallelStageMap(partitions) {
  //...implementation of helper function
}

pipeline {
  stages {
stage('example') {
  steps {
script {
  partitionsString = sh(returnStdout: true, script: '...')
  partitions = partitionsString.trim().split('\n')
  parallel getParallelStageMap(partitions)
  partitions.each { partition ->
unstash "stash_${partition}"
  }
}
// do some more stuff with the unstashed files
  }
  post {
// some post steps
  }
}
  }
}
 

 This setup works fine, but BlueOcean doesn't show any of the steps after "parallel" (including the post steps) when you click on the "example" stage. They only appear in the log in the classic UI.  
 

  
 
 
 
 

[JIRA] (JENKINS-41239) Error during always block skips execution of remaining steps

2018-04-04 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-41239  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Error during always block skips execution of remaining steps   
 

  
 
 
 
 

 
 Andrew Bayer thank you very much! While it doesn't fix the original issue, it very much fixes my use case. Especially the fact that `always` ran before `success` was giving me headaches.  
 

  
 
 
 
 

 
 
 

 
 
 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-50660) Whitelist: JsonOutput.toJson(Object) not included in generic whitelist

2018-04-09 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50660  
 
 
  Whitelist: JsonOutput.toJson(Object) not included in generic whitelist   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 script-security-plugin  
 
 
Created: 
 2018-04-09 09:31  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Moritz Baumann  
 

  
 
 
 
 

 
 Currently, you cannot output arrays or lists as JSON in pipeline scripts by default. This is because - unlike almost all other overloads of JsonOutput.toJson - JsonOutput.toJson(Object) is not on the generic whitelist. If this method is somehow problematic from a security POV, feel free to explain and close this issue, but I cannot see any reason to disallow this overload. According to the JavaDoc, this is what it does: 
 
Returns: "null" for a null value, or a JSON array representation for a collection, array, iterator or enumeration, or representation for other object.
  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  

[JIRA] (JENKINS-50337) BlueOcean does not show steps after a parallel step inside a script block

2018-04-24 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-50337  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: BlueOcean does not show steps after a parallel step inside a script block   
 

  
 
 
 
 

 
 I already stumbled upon that other bug while searching for existing issues. Now that I'm re-reading it, you might be right and this could be closed as duplicate. However, I'd like to bring to your attention that the "workarounds" mentioned in the other bug report don't help me at all. I'm already trying to use declarative for most of my pipeline, but that doesn't help me at all here. I'm also not sure why JENKINS-35836 is marked as "won't fix" while JENKINS-38442 is still open. It seems like the latter would make a solution to the former quite easy...  
 

  
 
 
 
 

 
 
 

 
 
 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-48300) Pipeline shell step aborts prematurely with ERROR: script returned exit code -1

2018-04-24 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-48300  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline shell step aborts prematurely with ERROR: script returned exit code -1   
 

  
 
 
 
 

 
 Sam Van Oort:  We're periodically running into this even though we don't use NFS on either the master or the slaves and even though we're using the fastest durability setting, so I did some research. It looks like between two heartbeat checks, there are a lot of network I/O operations between master and slave which can easily cause a timeout, even without NFS. Therefore, the current error message was extremely misleading in our case. At the very least, the error message should be changed to make people aware that the heartbeat timestamps are compared on the Jenkins master and that there are a lot of other network operations happening in between those two heartbeat checks. Without a code review of both plugins involved (Durable Task, Durable Task Step), I would have never figured that out. But I'm also questioning whether the defaults are sensible at all. Why should Jenkins assume that the shell process is dead just because a bunch of network operations between master and slave took more than 15 seconds to complete? That's an awfully short time span. Please reconsider the default value for this. I think something in the order of minutes might be more reasonable; short-term network congestion can happen from time to time and shouldn't cause builds to fail.  
 

  
 
 
 
 

 
 
 

 
 
 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, se

[JIRA] (JENKINS-48300) Pipeline shell step aborts prematurely with ERROR: script returned exit code -1

2018-04-24 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-48300  
 
 
  Pipeline shell step aborts prematurely with ERROR: script returned exit code -1   
 

  
 
 
 
 

 
Change By: 
 Moritz Baumann  
 
 
Comment: 
 [~svanoort]: We're periodically running into this even though we don't use NFS on either the master or the slaves and even though we're using the fastest durability setting, so I did some research. It looks like between two heartbeat checks, there are a lot of network I/O operations between master and slave which can easily cause a timeout, even without NFS. Therefore, the current error message was extremely misleading in our case.At the very least, the error message should be changed to make people aware that the heartbeat timestamps are compared on the Jenkins master and that there are a lot of other network operations happening in between those two heartbeat checks. Without a code review of both plugins involved (Durable Task, Durable Task Step), I would have never figured that out.But I'm also questioning whether the defaults are sensible at all. Why should Jenkins assume that the shell process is dead just because a bunch of network operations between master and slave took more than 15 seconds to complete? That's an awfully short time span.Please reconsider the default value for this. I think something in the order of minutes might be more reasonable; short-term network congestion can happen from time to time and shouldn't cause builds to fail.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
  

[JIRA] (JENKINS-48300) Pipeline shell step aborts prematurely with ERROR: script returned exit code -1

2018-04-24 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-48300  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline shell step aborts prematurely with ERROR: script returned exit code -1   
 

  
 
 
 
 

 
 Sorry for my earlier comment (which I deleted); I misunderstood the logic in ShellController::exitStatus when I first glanced over it. I will try to better understand what's happening in my case (why we're getting failures even though we're using a local hard disk) and comment here and/or open a new issue once I've actually understood the problem.  
 

  
 
 
 
 

 
 
 

 
 
 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-27725) Unclassified error on Date.parse(String, String) from DefaultGroovyStaticMethods

2018-05-15 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann commented on  JENKINS-27725  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Unclassified error on Date.parse(String, String) from DefaultGroovyStaticMethods   
 

  
 
 
 
 

 
 An idiomatic way to get the current day of the week in Groovy would be: 

 

new Date()[Calendar.DAY_OF_WEEK]
 

 This also fails with the following error message: 

 

Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DateGroovyMethods getAt java.util.Date int
 

 Just wanted to make sure this particular method as well, since nobody else mentioned it before and IMO that should be allowed as well.  
 

  
 
 
 
 

 
 
 

 
 
 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-51332) Calendar day constants not allowed in pipeline scripts

2018-05-15 Thread moritz.baum...@oracle.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Moritz Baumann created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-51332  
 
 
  Calendar day constants not allowed in pipeline scripts   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Andrew Bayer  
 
 
Components: 
 script-security-plugin  
 
 
Created: 
 2018-05-15 11:19  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Moritz Baumann  
 

  
 
 
 
 

 
 While trying to implement a day-of-week check in one of our pipelines, I ran across the following error: 

 

Scripts not permitted to use staticField java.util.Calendar TUESDAY
 

 Currently, you're allowed to use Calendar.getInstance().get(Calendar.DAY_OF_WEEK), but not the constants you need to interpret the result. This seems like an obvious accidental omission.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment