CI: check for possible diff after make vendor
We can commit broken vendoring here because there is no actual test to verify that the vendor directory is clean after make vendor. PR[1] had a renovate bug[2] which causes it to not run go mod tidy, this was not caused by CI because of it. [1] https://github.com/containers/common/pull/1555 [2] https://github.com/containers/automation/pull/148 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
d383a0b593
commit
b456f02fbb
|
@ -52,6 +52,7 @@ testing_task:
|
|||
- export PATH="$PATH:$GOPATH/bin"
|
||||
- gpg --batch --passphrase '' --quick-gen-key tester@localhost default default never
|
||||
- make vendor
|
||||
- hack/tree_status.sh
|
||||
- make build
|
||||
- make build-cross
|
||||
- make test
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
SUGGESTION="${SUGGESTION:-run \"make vendor\" and commit all changes.}"
|
||||
|
||||
STATUS=$(git status --porcelain)
|
||||
if [[ -z $STATUS ]]
|
||||
then
|
||||
echo "tree is clean"
|
||||
else
|
||||
echo "tree is dirty, please $SUGGESTION"
|
||||
echo ""
|
||||
echo "$STATUS"
|
||||
echo ""
|
||||
echo "---------------------- Diff below ----------------------"
|
||||
echo ""
|
||||
git --no-pager diff
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue