下面是我的共享库函数。
def Printing_output(String name, String company){
sh (
'echo "Hi there, this is {name} and am working for {company}"'
)
}
下面是我的管道脚本
@Library('Maven_Build_Pipeline') _
pipeline {
agent { label "Build-Jenkins-Slave-94" }
stages {
stage('Test') {
steps {
script{
def name = 'Rajini'
def company = 'Amazon'
partial_script_test.Printing_output(name, company)
}
}
}
}
}
Exution后,它没有正确打印参数值,也没有出现任何错误。
下面是我的jenkins作业输出
Hi there, this is {name} and am working for {company}
有人能提一下我在这里错过了什么吗?我对共享图书馆的概念不熟悉。
提前感谢。