[英]VSTS build number for build definition
I have a few branches in my git repo eg master for production, dev for development, qa for testing, etc. 我的git仓库中有几个分支,例如,生产主管,开发人员开发,测试人员质量检查等。
Each branch has it's own build definition, like app-dev, app-qa, app-prod, etc. 每个分支都有自己的构建定义,例如app-dev,app-qa,app-prod等。
I'd like to include build number as a part of artifact name, eg 0.3.0-SNAPSHOT. 我想将内部版本号作为工件名称的一部分包括在内,例如0.3.0-SNAPSHOT。 53 for development or 0.2.0-RC.
53用于开发或0.2.0-RC。 12 for testing.
12进行测试。
Obviously each build definition's number should be unique. 显然,每个构建定义的编号应该是唯一的。
Is it possible? 可能吗?
使用此处记录的$(Rev:.r)
令牌: 内部编号格式 。
Use the predefined Build.BuildID variable. 使用预定义的Build.BuildID变量。 In your example, your build number definition would look like the following:
在您的示例中,内部版本号定义如下所示:
All of the predefined variables are available in the Build Variables documentation 所有预定义变量都可以在Build Variables文档中找到
More information about Build Number formats can be found Here 有关内部版本号格式的更多信息,请参见此处
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.