繁体   English   中英

如何使用 Bitbucket Pipelines (bitbucket-pipelines.yml) git tag 发布

[英]How to git tag release with Bitbucket Pipelines (bitbucket-pipelines.yml)

如何使用 bitbucket-pipelines.yml 文件在管道中标记 git commit?

我的脚本如下。 要使用它,您需要

  1. 在 Repo -> Settings -> Pipelines -> SSH keys 中添加 SSH 密钥
  2. 公钥添加到团队或您的个人资料 SSH 密钥
- step: &tag
  name: Tag version
  image: atlassian/default-image:2
  script:
    - git remote set-url origin ${BITBUCKET_GIT_SSH_ORIGIN}

    - dt=$(date '+%Y-%m-%d_%H%M');
    - git tag $dt ${BITBUCKET_COMMIT}
    - git push origin --tags

在这里你有管道-git 授权的完整文档: https : //confluence.atlassian.com/bitbucket/push-back-to-your-repository-962352710.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM