Skip to content

Commit

Permalink
Issue #11554: Added 'git diff' validation after execution of verify p…
Browse files Browse the repository at this point in the history
…hase to Azure
  • Loading branch information
Rahulkhinchi03 authored and nrmancuso committed Jun 8, 2022
1 parent cd28d8c commit 1398043
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
11 changes: 0 additions & 11 deletions .ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,6 @@ deploy-snapshot)
sleep 5s
;;

git-diff)
if [ "$(git status | grep 'Changes not staged\|Untracked files')" ]; then
printf "Please clean up or update .gitattributes file.\nGit status output:\n"
git status
printf "Top 300 lines of diff:\n"
git diff | head -n 300
sleep 5s
false
fi
;;

ci-temp-check)
fail=0
mkdir -p .ci-temp
Expand Down
9 changes: 9 additions & 0 deletions .ci/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,15 @@ no-warning-imports-java-design-patterns)
fi
;;

git-diff)
if [ "$(git status | grep 'Changes not staged\|Untracked files')" ]; then
printf "Please clean up or update .gitattributes file.\nGit status output:\n"
printf "Top 300 lines of diff:\n"
git diff | head -n 300
false
fi
;;

*)
echo "Unexpected argument: $1"
sleep 5s
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ script:
- ./.ci/travis.sh run-command "$CMD"
- ./.ci/travis.sh remove-custom-mvn
- ./.ci/travis.sh remove-adoptium-jdk
- ./.ci/travis.sh git-diff
- ./.ci/validation.sh git-diff
- ./.ci/travis.sh ci-temp-check

after_success:
Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ steps:
echo "BUILD_REASON:"$BUILD_REASON
echo "cmd: "$(cmd)
eval "$(cmd)"
./.ci/validation.sh git-diff
condition: |
or (
ne(variables.ON_CRON_ONLY, 'true'),
Expand Down

0 comments on commit 1398043

Please sign in to comment.