Below code works in my single jenkinsfile
stage('install') {
agent {
docker {
image: <some golang image>
args '-u root:root'
reuseNode true
}
}
}
But when I tried to create a shared library, and put whole pipeline inside
a library and used by another repo, it keeps complaining:
org.jenkinsci.plugins.workflow.cps.CpsCompilationErrorsException: startup
failed:
Invalid config option "call" for agent type "docker". Valid config options are
[image, alwaysPull, args, containerPerStageRoot, customWorkspace, label,
registryCredentialsId, registryUrl, reuseNode] @ line 29, column 25.
args '-u root:root'
^
if I disable the args, it go through correctly. Other options do works for me,
except args, wondering any one have the same experience?
shared library is in GoTest.groovy:
def call() {
pipeline {
...
that stage
...
}
}
my call is like:
@Library('[email protected]') _
GoTest()
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/6c4463bd-637d-443f-9899-1238e2272171%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.