如何在Openshift Origin上构建一个git标签?

时间:2016-11-22 13:51:14

标签: git openshift openshift-origin buildconfig

如何在Openshift Origin上创建BuildConfig来构建特定的git标签?

我在documentation

上找不到

我尝试了committag,如下所示:

  source:
    type: Git
    git:
      uri: 'https://github.com/luiscoms/gravity-world.git'
      ref: master
      commit: 1.0.0
      tag: 1.0.0

带标签:

  source:
    type: Git
    git:
      uri: 'https://github.com/luiscoms/gravity-world.git'
      ref: master
      tag: 1.0.0

1 个答案:

答案 0 :(得分:1)

您应该在“ref”属性中指定标记(标记对于存储库是全局的)

source:
    type: Git
    git:
      uri: 'https://github.com/luiscoms/gravity-world.git'
      ref: myTag_1.0.0

这是openshift文档参考:

git字段包含源代码的远程Git存储库的URI。可选地,指定ref字段以检出特定的Git引用。有效的ref可以是SHA1标记或者分支名称

https://docs.openshift.com/enterprise/3.1/dev_guide/builds.html#source-code