We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51e4e80 commit f24a04fCopy full SHA for f24a04f
.azure-pipelines/azure-pipelines-build.yml
@@ -132,3 +132,4 @@ jobs:
132
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
133
fi
134
displayName: "Build sonic image"
135
+ - template: check-dirty-version.yml
.azure-pipelines/check-dirty-version.yml
@@ -0,0 +1,16 @@
1
+steps:
2
+- script: |
3
+ . functions.sh
4
+ SONIC_VERSION=$(sonic_get_version)
5
+ echo "SONIC_VERSION=$SONIC_VERSION"
6
+ if [[ "$SONIC_VERSION" == *dirty* ]]; then
7
+ # Print the detail dirty info
8
+ git status --untracked-files=no -s --ignore-submodules
9
+
10
+ # Exit with error, if it is a PR build
11
+ if [ "$(Build.Reason)" == "PullRequest" ]; then
12
+ echo "Build failed for the dirty version: $SONIC_VERSION" 1>&2
13
+ exit 1
14
+ fi
15
16
+ displayName: "Check the dirty version"
0 commit comments