在一个jenkins管道中,我试图从一个dev分支中拉取,标记为't_int_dev'。稍后我想拉取标记't_int_dev'并重新标记为't_int_qa'并推送它。
第一部分工作正常:
checkout scmGit( branches: [[name: 'b_dev']], userRemoteConfigs: [[credentialsId: creds, url: repo ]])
sh("""git pull origin b_dev &&
git tag -f t_int_dev &&
git push -f origin t_int_dev""")
字符串
但是后来,当我想拉取dev标签并重新标记为qa时,我在这一行得到一个错误:
checkout scmGit( branches: [[name: 't_int_dev']], userRemoteConfigs: [[credentialsId: creds, url: repo ]])
型
Jenkins错误:
第一个月
为什么会发生这种情况?
1条答案
按热度按时间mm5n2pyu1#
尝试使用目标标记的完整ref名称:
字符串
如果你收到一条消息,说这是一个未知的修订版,那么也可以尝试设置一个refspec,它会指示git下载这个标签:
型
上面的refspec指示只下载特定的
t_int_dev
标签,你可以使用一个更通用的refspec:型