Skip to content

Commit

Permalink
Improve the PR build version (sonic-net#7381)
Browse files Browse the repository at this point in the history
Why I did it
Improve the version of the Pull Request build by changing the local branch name.

How I did it
Change the default branch name merge to [target_branch_name]-[pullrequestid].

How to verify it
For official build, the version is not changed.
For pull request build, the version as below:
  • Loading branch information
xumia authored and Carl Keene committed Aug 7, 2021
1 parent 4c287bb commit 44d8359
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
submodules: recursive
displayName: 'Checkout code'
- script: |
git checkout -b $(Build.SourceBranchName)
BRANCH_NAME=$(Build.SourceBranchName)
[ -n "$SYSTEM_PULLREQUEST_PULLREQUESTID" ] && BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH-$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
git checkout -b $BRANCH_NAME
sudo modprobe overlay
sudo apt-get install -y acl
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
Expand Down

0 comments on commit 44d8359

Please sign in to comment.