[JIRA] (JENKINS-58497) Jenkins picks a random agent if agent is 'null'

2019-07-17 Thread hemilpate...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 hemil patel commented on  JENKINS-58497  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Jenkins picks a random agent if agent is 'null'   
 

  
 
 
 
 

 
 Hmm, If this is as designed, I can see this being potentially destructive.  For eg. 

 

pipeline {
agent none
stages {
stage ('This stage should not run anywhere.') {
agent {
label env.NODE_THAT_DOES_NOT_EXIST
}
steps {
echo "Agent is : " + env.NODE_THAT_DOES_NOT_EXIST
echo 'Do a destructive action'
killServer()
}
}
}
}

def killServer() {
 //kill server code here
}
 

 For such a small mistake, user should not have to suffer potentially catastrophic damage.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.200636.1563204753000.14771.1563393180226%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58497) Jenkins picks a random agent if agent is 'null'

2019-07-17 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev commented on  JENKINS-58497  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Jenkins picks a random agent if agent is 'null'   
 

  
 
 
 
 

 
 Looks like "As designed", will defer to the Pipeline team. CC Liam Newman  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.200636.1563204753000.13617.1563348840275%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58497) Jenkins picks a random agent if agent is 'null'

2019-07-17 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58497  
 
 
  Jenkins picks a random agent if agent is 'null'   
 

  
 
 
 
 

 
Change By: 
 Oleg Nenashev  
 
 
Component/s: 
 pipeline  
 
 
Component/s: 
 core  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
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.200636.1563204753000.13615.1563348780163%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-58497) Jenkins picks a random agent if agent is 'null'

2019-07-15 Thread hemilpate...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 hemil patel created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58497  
 
 
  Jenkins picks a random agent if agent is 'null'   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Attachments: 
 image-2019-07-15-11-32-00-541.png  
 
 
Components: 
 core  
 
 
Created: 
 2019-07-15 15:32  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 hemil patel  
 

  
 
 
 
 

 
 Jenkins picks a random agent if agent is 'null' How to reproduce 
 
Create a pipeline job with following script  

 

pipeline {
agent none
stages {
stage ('This stage should not run anywhere.') {
agent {
label env.NODE_THAT_DOES_NOT_EXIST
}
steps {
echo "Agent is : " + env.NODE_THAT_DOES_NOT_EXIST
echo 'Test'
}
}
}
}
 

 
 Results  
 
The way I expect this to work is if the node does not exist, the Jenkins pipeline should fail saying the "The node does not exist" instead of picking up a random agent from available agents. 
 
 Acceptance criteria