我有以下内容:
vars文件夹中的一个脚本名为deleteFile.groovy,可以尝试-工作。图书馆被称为myOneLibfirstPipe.groovy@Library('myOneLib') _
def execute(String zCmakeListsPath){
stage('some kind of stage 2') {
echo "Hello from stage 1 with " + zCmakeListsPath
echo "var attempt ${env.mySrcDir}"
}
stage('second stage'){
echo "and one from stage 2"
echo "param was " + zCmakeListsPath
echo "var attempt ${env.myBuildDir}"
//call function from global lib
deleteFile 'for 3rd party global library now'
}
}
return thisRun Code Online (Sandbox Code Playgroud)
caller.groovy调用的管道脚本正在调用firstPipe.groovypipeline {
agent any
environment {
myBuildDir …Run Code Online (Sandbox Code Playgroud)