properties = null
def loadProperties() { node { checkout scm properties = readProperties file: 'pipeline.properties' echo "Immediate one ${properties.repo}" }}
pipeline { agent none stages { stage ('prepare') { agent any steps { script { loadProperties() } } } stage('Build') { agent { label '${properties.agent}' } steps { sh 'hostname' echo properties.repo } } }}
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4cfff4fb-aa1f-4ad2-9017-d6dcf89a7b36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Eric Pyle Siemens PLM Software Lebanon, NH +1 603-277-3060 eric...@siemens.com http://www.siemens.com/plm
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d96a65f5-9926-4325-9f02-1c4649330b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
stage("Backup ${DATABASE}") {
steps {
sh '''
...
'''
}
}
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 25: Expected string literal @ line 25, column 15. stage("Backup ${DATABASE}") { 1 error 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:129) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:123) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:517) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:480) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:268) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE