问题描述
def paramOne = 'test'
def paramTwo = ['latest','dev']
shell(readFileFromWorkspace('function.groovy'))
在function.groovy中,我有:
def dockerJobFunction = {
paramTwo.each { paramSet ->
pipelineJob("${paramOne}-${paramTwo}") {
properties {
githubProjectUrl('https://github.com/xxxx/xxxx_xxxx/')
}
parameters {
choiceParam('BUILD_TYPE',['dev','prod'],'Select an image build type')
wReadonlyStringParameterDeFinition {
name('paramOne')
defaultValue(paramOne)
description('Param One')
}
wReadonlyStringParameterDeFinition {
name('paramTwo')
defaultValue(paramTwo)
description('Param Two')
}
}
deFinition {
cps {
script(readFileFromWorkspace('pipelines/stuff.groovy'))
sandBox()
}
}
logrotator {
numToKeep(100)
}
}
}
}
com.xxxxdsl.JobScriptsspec > test script android.groovy Failed
org.spockframework.runtime.UnallowedExceptionThrownError at JobScriptsspec.groovy:45
Caused by: javaposse.jobdsl.dsl.DslScriptException at JobScriptsspec.groovy:41
97 tests completed,1 Failed
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)