aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-01-19 17:19:46 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-01-20 14:38:02 +0100
commita3621a7cff27a77a53031cd58b2015a0f178101b (patch)
treeb46d046e20257b5870352f85c0bf29c68e90835b
parent41a7e11c7e3eb756a43316558d712eea33e11829 (diff)
downloadpodman-a3621a7cff27a77a53031cd58b2015a0f178101b.tar.gz
podman-a3621a7cff27a77a53031cd58b2015a0f178101b.tar.bz2
podman-a3621a7cff27a77a53031cd58b2015a0f178101b.zip
Cirrus: add bindings checks
Make sure that bindings are in sync with the code. The check is similar to what's already being done with `make vendor`, so integrate the two. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r--.cirrus.yml14
-rw-r--r--Makefile1
-rwxr-xr-xcontrib/cirrus/runner.sh6
-rwxr-xr-xcontrib/cirrus/setup_environment.sh2
4 files changed, 14 insertions, 9 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index bfe293601..2aa751f9f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -274,17 +274,19 @@ swagger_task:
# Check that all included go modules from other sources match
-# what is expected in `vendor/modules.txt` vs `go.mod`.
-vendor_task:
- name: "Test Vendoring"
- alias: vendor
+# what is expected in `vendor/modules.txt` vs `go.mod`. Also
+# make sure that the generated bindings in pkg/bindings/...
+# are in sync with the code.
+consistency_task:
+ name: "Test Code Consistency"
+ alias: consistency
skip: *tags
depends_on:
- build
container: *smallcontainer
env:
<<: *stdenvars
- TEST_FLAVOR: vendor
+ TEST_FLAVOR: consistency
TEST_ENVIRON: container
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
clone_script: *full_clone # build-cache not available to container tasks
@@ -642,7 +644,7 @@ success_task:
- validate
- bindings
- swagger
- - vendor
+ - consistency
- alt_build
- static_alt_build
- osx_alt_build
diff --git a/Makefile b/Makefile
index aed912ece..dfa36e3ef 100644
--- a/Makefile
+++ b/Makefile
@@ -464,6 +464,7 @@ podman-remote-%-release:
rm -f release.txt
$(MAKE) podman-remote-release-$*.zip
+.PHONY: generate-bindings
generate-bindings:
ifneq ($(shell uname -s), Darwin)
GO111MODULE=off $(GO) generate ./pkg/bindings/... ;
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index e968fac45..d9f91c7af 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -146,9 +146,11 @@ function _run_swagger() {
cp -v $GOSRC/pkg/api/swagger.yaml $GOSRC/
}
-function _run_vendor() {
+function _run_consistency() {
make vendor
- ./hack/tree_status.sh
+ SUGGESTION="run 'make vendor' and commit all changes" ./hack/tree_status.sh
+ make generate-bindings
+ SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh
}
function _run_build() {
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 5c6f05ac0..7b49caba0 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -214,7 +214,7 @@ case "$TEST_FLAVOR" in
install_test_configs
;;
- vendor) make clean ;;
+ consistency) make clean ;;
release) ;;
*) die_unknown TEST_FLAVOR
esac