对于多存储库的Azure Pipeline,如何从已检出的资源存储库获取GIT提交ID?是否支持?
我正在使用Azure repo存储管道yaml文件,并在代理上检查构建源以进行构建。由于我们使用Delphi,因此必须使用代理。
我正在使用Azure repo存储管道yaml文件,并在代理上检查构建源以进行构建。由于我们使用Delphi,因此必须使用代理。
resources:
repositories:
- repository: MyBitBucketRepo
type: bitbucket
endpoint: MyBitBucketServiceConnection
name: MyBitBucketOrgOrUser/MyBitBucketRepo
trigger:
- pilot
pool:
name: MyAgent
demands: RADSTUDIO
variables:
GIT_COMMIT: $(Build.SourceVersion) # <- How can I get the checked out Commit ID for the MyBitBucketRepo?
GIT_BRANCH: $(Build.SourceBranchName) # And the branch name?
steps:
- checkout: MyBitBucketRepo
- script: dir $(Build.SourcesDirectory)
- script: echo $(GIT_COMMIT)
- script: echo $(GIT_BRANCH)
# todo set environment vars on agent with the Commit and Branch names required by msbuild script on agent
# todo run msbuild script on agent