使用 Jenkins Job DSL 推送标签
Push a tag with Jenkins Job DSL
我想添加一个标签来推送到远程仓库
所以我创建了一个这样的工作
job('example-2') {
scm {
git('ssh://git@abc.git', 'branchName')
}
steps {
shell('sh XXXX')
}
publishers {
git {
pushOnlyIfSuccess()
tag('ssh://git@abc.git', 'v1.6') {
message('Release v1.6')
create()
update()
}
}
}
}
函数标签(?,?)的参数对吗?
好像不行。
这样就对了
git {
remote {
name("abc")
url("ssh://git@abc.git")
}
branch('branchName')
}
tag("abc","v1.6") {
......
我想添加一个标签来推送到远程仓库 所以我创建了一个这样的工作
job('example-2') {
scm {
git('ssh://git@abc.git', 'branchName')
}
steps {
shell('sh XXXX')
}
publishers {
git {
pushOnlyIfSuccess()
tag('ssh://git@abc.git', 'v1.6') {
message('Release v1.6')
create()
update()
}
}
}
}
函数标签(?,?)的参数对吗? 好像不行。
这样就对了
git {
remote {
name("abc")
url("ssh://git@abc.git")
}
branch('branchName')
}
tag("abc","v1.6") {
......