[JIRA] (JENKINS-50060) Workspace error when setting stage level agent when global agent specified.

2018-03-15 Thread matthewcer...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 M C commented on  JENKINS-50060  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Workspace error when setting stage level agent when global agent specified.
 

  
 
 
 
 

 
 Trying the above results in the same issue. What did work was this: 

 

podTemplate(label: buildId(),
  containers: [.]) {

  node(buildId()) {
container('node') {
...
}
  }
}

node('docker1') {
   ...
} 

  
 

  
 
 
 
 

 
 
 

 
 
 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-45700) Template inheritance seems not to work like documented

2018-03-15 Thread matthewcer...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 M C commented on  JENKINS-45700  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Template inheritance seems not to work like documented   
 

  
 
 
 
 

 
 This still does not work. I copied the exact code above, ran it and just get one container. That being maven.  This use to work for me as I have a shared library with templates that can be composed together. But a recent update has broken this functionality. Big blocker for me as declarative syntax doesn't support multiple containers (really wish it did) so fell back to scripted to find out it is broken as well.  I am running on Jenkins 2.110 with plugin 1.3.1 (I know 1.3.2 is available but I am always hesitant to upgrade plugins with Jenkins as more often than not then end up breaking additional things).   
 

  
 
 
 
 

 
 
 

 
 
 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-50060) Workspace error when setting stage level agent when global agent specified.

2018-03-09 Thread matthewcer...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 M C created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50060  
 
 
  Workspace error when setting stage level agent when global agent specified.
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 pipeline  
 
 
Created: 
 2018-03-10 06:42  
 
 
Environment: 
 Jenkins 2.110 running inside a Kubernetes Cluster  
 
 
Priority: 
  Blocker  
 
 
Reporter: 
 M C  
 

  
 
 
 
 

 
 I have the following declarative pipeline   

 

#!/usr/bin/env groovy
@Library('shared-library@1.1.0') _

pipeline {
  agent {
kubernetes {
  label buildId()
  containerTemplate {
name 'node'
image 'node:8.9.4-alpine'
ttyEnabled true
command 'cat'
  }
}
  }
  stages {

stage('Build') {
  steps {
sh "npm run build"

// stash build directory
stash includes: 'build/**', name: 'app'
  }
}

stage('Unit Test') {
  steps {
sh "npm run test"
  }
}

stage('Package') {
  agent { node { label 'docker1' } }
  options { skipDefaultCheckout() }
  steps {
sh "/bin/sleep 120"
  }
}
  }

}

 

 My use case is due to the fact that the Kubernetes declarative plugin doesn't allow you to specify multiple containers (as far as I know) nor volumes.  The node I have is simply a JNLP POD running in my kubernetes cluster that has the docker socket mounted into it as well as the docker client.  During execution, the Package step connects to the docker1 node successfully but errors with the following: