[英]Git Tag for Jenkins after Releasing
我在一个项目中使用 Jenkins、GitLab、Maven 和 Nexus。 以前我使用 Jenkins shell 命令上传 mvn build 和 nexus release artifact。 现在我必须为它创建 Git 标签。 有人可以提供这样做的指导。 我正在使用 shell 命令的所有东西。我可以使用这些命令吗?
git tag -a v0.0.1 -m "0.0.1 tag"
git push origin v0.0.1
这些命令对我有用。
#!/bin/bash
echo tagging with build-$BUILD_NUMBER
git tag -f build-$BUILD_NUMBER
git tag -l
git remote -v
git remote set-url origin https://$USERNAME:$PASSWORD@hub.jazz.net/git/user/project
git push --tags origin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.