-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Ci]: check if there is a sonic dirty version issue #10445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| steps: | ||
| - script: | | ||
| . functions.sh | ||
| SONIC_VERSION=$(sonic_get_version) | ||
| echo "SONIC_VERSION=$SONIC_VERSION" | ||
| if [[ "$SONIC_VERSION" == *dirty* ]]; then | ||
| # Print the detail dirty info | ||
| git status --untracked-files=no -s --ignore-submodules | ||
| # Exit with error, if it is a PR build | ||
|
||
| if [ "$(Build.Reason)" == "PullRequest" ]; then | ||
| echo "Build failed for the dirty version: $SONIC_VERSION" 1>&2 | ||
| exit 1 | ||
| fi | ||
| fi | ||
| displayName: "Check the dirty version" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it too late. If we detect dirty, we don't need to build at all.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiluo-msft , the dirty is detected after build, during the build, we do not know which target introduce the dirty issue. In most cases, no one changes the source code, if some one changes it, it has value to wait for the build complete and detect it.
The check only impacts someone tries to do some bad thing, and not have any impact on the other cases.