[JIRA] (JENKINS-58834) pipeline multi-agent configure unexpected error

2019-08-06 Thread al...@icloud.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 leslie leslie closed an issue as Not A Defect  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 human mistake  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-58834  
 
 
  pipeline multi-agent configure unexpected error   
 

  
 
 
 
 

 
Change By: 
 leslie leslie  
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Not A Defect  
 

  
 
 
 
 

 
 
 

 
 
 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.201149.1565122766000.9275.1565125320352%40Atlassian.JIRA.


[JIRA] (JENKINS-58834) pipeline multi-agent configure unexpected error

2019-08-06 Thread al...@icloud.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 leslie leslie updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58834  
 
 
  pipeline multi-agent configure unexpected error   
 

  
 
 
 
 

 
Change By: 
 leslie leslie  
 

  
 
 
 
 

 
 Unexpected error from pipeline configure below{code:java}pipeline {agent none stages {stage('test1') {agent {docker 'centos:centos7'args '-u root'}steps {sh 'pwd'sh 'whoami' sh 'ansible --version' }}stage('test2') {agent {docker 'centos:latest'}steps {echo 'test2'}}}}{code}Error message{code:java}Started by user adminRunning in Durability level: MAX_SURVIVABILITYorg.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:WorkflowScript: 5: Only one agent type is allowed per agent section @ line 5, column 13.   agent {   ^WorkflowScript: 5: No agent type specified. Must be one of [any, docker, dockerfile, label, none] @ line 5, column 13.   agent {   ^2 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:561) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:522) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)Finished: FAILURE{code}  
 

  
 
 
 
 

 
 
 

 
  

[JIRA] (JENKINS-58834) pipeline multi-agent configure unexpected error

2019-08-06 Thread al...@icloud.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 leslie leslie created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-58834  
 
 
  pipeline multi-agent configure unexpected error   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Carlos Sanchez  
 
 
Components: 
 docker, groovy-plugin, pipeline  
 
 
Created: 
 2019-08-06 20:19  
 
 
Environment: 
 OS: Centos 7  Docker ver. 18.09.7  Jenkins ver. 2.176.2  
 
 
Labels: 
 jenkins pipline docker agents stage  
 
 
Priority: 
  Major  
 
 
Reporter: 
 leslie leslie  
 

  
 
 
 
 

 
 Unexpected error from pipeline configure below 

 

pipeline {
agent none 
stages {
stage('test1') {
agent {
docker 'centos:centos7'
args '-u root'
}
steps {
sh 'pwd'
sh 'whoami'
sh 'ansible --version'
}
}
stage('test2') {
agent {
docker 'centos:latest'
}
steps {
echo 'test2'
}
}
}
} 

 Error message 

 

Started by user admin

Running in Durability level: MAX_SURVIVABILITY

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: