git - 发布后 Jenkins 的 Git Tag
问题描述
我正在为一个项目使用 Jenkins、GitLab、Maven 和 Nexus。以前我使用 Jenkins shell 命令进行 mvn build 和 nexus release 工件上传。现在我必须为它创建 Git Tag。有人可以提供这样做的指导。我使用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
推荐阅读
- angular - 角度和评估:我得到一个环境错误
- javascript - 如何更改选中复选框的父元素的样式
- react-native - 我应该将 onBackPressureBuffer(n) 放在 RxJava 订阅链的哪个位置?
- jquery - jQuery "this" apparently not selecting unique instance
- r - R:根据其他两列的匹配替换列
- sql - 通过 VPN 看不到 SQL 视图,但可以看到表
- mysql - MySQL 错误 - ALTER 在此位置无效
- linux - Ansible 中的全局修改 $PATH 无法在常规 Linux shell 中按预期工作
- vue.js - 如何在 VueJS 中监听一个组件的所有事件?
- java - 不推荐使用 HTTPUtils .. 我该怎么做?