Files
podman/contrib/cirrus/postbuild.sh
Chris Evich 0660f5b7a4 Cirrus: Combine build and code consistency tasks
It's conceivable for CI to spend a lot of time testing code which
otherwise should be rejected due to quality problems.  Previously this
was validated in a dedicated task, however a failure would still fail
the CI run.  Simplify the number of CI tasks by combining the consistency
check at the tail-end of the build task.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-29 13:06:01 -04:00

31 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -eo pipefail
# This script attempts to confirm all included go modules from
# other sources match 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. It's intended
# for use after successfully building podman, to prevent wasting
# time on tests that might otherwise succeed with bad/ugly/invalid
# code.
source /etc/automation_environment
source $AUTOMATION_LIB_PATH/common_lib.sh
# Defined by the CI system
# shellcheck disable=SC2154
cd $CIRRUS_WORKING_DIR
showrun make .install.goimports
showrun make vendor
SUGGESTION="run 'make vendor' and commit all changes" ./hack/tree_status.sh
showrun make generate-bindings
SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh
showrun make completions
SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh
# Defined in Cirrus-CI config.
# shellcheck disable=SC2154
$SCRIPT_BASE/check_go_changes.sh