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

2018-05-25 Thread jenkins...@carlossanchez.eu (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Carlos Sanchez resolved as Not A Defect  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
Change By: 
 Carlos Sanchez  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Not A Defect  
 

  
 
 
 
 

 
 
 

 
 
 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-04-12 Thread jenkins...@carlossanchez.eu (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Carlos Sanchez commented on  JENKINS-50060  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
 I don't see how a node would work inside container as that is sent to the container to be executed there. For me this is not valid, just do instead 

 

podTemplate(label: buildId(),
containers: [containerTemplate(name: 'node', image: 'node:8.9.4-alpine', ttyEnabled: true, command: 'cat')]) {
node(buildId()) {
container('node') {
sh "echo 'on ${HOSTNAME}'"
}
node('docker1') {
 sh "echo 'on ${HOSTNAME}'"
}
container('node') {
// do something else
}
}
}
 

  
 

  
 
 
 
 

 
 
 

 
 
 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-04-12 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
 So this is a Kubernetes plugin issue, given that the scripted example failed too - you can't use a node step (at least for a non-kubernetes agent) inside a Kubernetes agent node step. So I've removed the Declarative component.  
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Component/s: 
 pipeline-model-definition-plugin  
 
 
Priority: 
 Blocker Major  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed 

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

2018-04-06 Thread jenkins...@carlossanchez.eu (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Carlos Sanchez commented on  JENKINS-50060  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
 

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. 
 Declarative now does support it, see JENKINS-48135  
 

  
 
 
 
 

 
 
 

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

2018-03-12 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-50060  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
 So this is similar to JENKINS-46831 but Kubernetes-specific. Could you try something like this in Scripted? 

 

podTemplate(label: buildId(),
containers: [containerTemplate(name: 'node', image: 'node:8.9.4-alpine', ttyEnabled: true, command: 'cat')]) {
node(buildId()) {
container('node') {
sh "echo 'on ${HOSTNAME}'"
node('docker1') {
 sh "echo 'on ${HOSTNAME}'"
}
}
}
}
 

 That's basically analogous to how your Declarative Pipeline works vis a vis Kubernetes and the label agent. So the question we're trying to answer is whether you can call node within a container block.  
 

  
 
 
 
 

 
 
 

 
 
 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-12 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

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

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Component/s: 
 kubernetes-plugin  
 
 
Component/s: 
 pipeline-model-definition-plugin  
 
 
Component/s: 
 pipeline  
 

  
 
 
 
 

 
 
 

 
 
 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: