【问题标题】:how do I get the revision name from buildbot如何从 buildbot 获取修订名称
【发布时间】:2013-08-22 16:47:33
【问题描述】:

main.cfg 文件中,我需要获取正在构建的当前版本的名称并使用该版本的名称创建一个文件夹。

【问题讨论】:

    标签: buildbot


    【解决方案1】:

    http://docs.buildbot.net/0.7.12/#Generalizing-VC-Systems

    大多数 Source 步骤都会记录他们在 got_revision 属性中签出的修订。

    【讨论】:

      【解决方案2】:

      在自定义步骤启动方法中,您可以检索 branchrevision 属性。 比如:

      from buildbot.steps.shell import ShellCommand
      
      class MyStep(ShellCommand):
          def start(self):
              branch = self.getProperty('branch')
              revision = self.getProperty('revision')
              # Do watever, for example
              # self.setCommand('echo "Building %s"' % revision)
              ShellCommand.start(self)
      

      您可以在the documentation 中阅读有关构建属性的更多信息

      【讨论】:

        猜你喜欢
        • 2013-06-14
        • 2018-03-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-10-13
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多