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('comm...@0.0.1') _GoTest()