github.com/containers/podman/v4@v4.9.4/contrib/cirrus/postbuild.sh (about)

     1  #!/bin/bash
     2  
     3  set -eo pipefail
     4  
     5  # Skip this entire script when run under nightly treadmill cron job.
     6  #
     7  # Treadmill vendors in containers/<many>, which may bring in new versions
     8  # of other dependencies such as cobra, which may change the completion
     9  # files, which gives us a failure that we don't care one whit about.
    10  # The purpose of the treadmill is to check for incompatibilities with
    11  # other closely-tied container modules.
    12  # shellcheck disable=SC2154
    13  if [[ "$CIRRUS_CRON" = "treadmill" ]]; then
    14      echo "[in treadmill; skipping $(basename $0)]"
    15      exit 0
    16  fi
    17  
    18  # This script attempts to confirm all included go modules from
    19  # other sources match what is expected in `vendor/modules.txt`
    20  # vs `go.mod`.  Also make sure that the generated bindings in
    21  # `pkg/bindings/...` are in sync with the code.  It's intended
    22  # for use after successfully building podman, to prevent wasting
    23  # time on tests that might otherwise succeed with bad/ugly/invalid
    24  # code.
    25  
    26  source /etc/automation_environment
    27  source $AUTOMATION_LIB_PATH/common_lib.sh
    28  
    29  # Defined by the CI system
    30  # shellcheck disable=SC2154
    31  cd $CIRRUS_WORKING_DIR
    32  
    33  showrun make .install.goimports
    34  showrun make vendor
    35  SUGGESTION="run 'make vendor' and commit all changes" ./hack/tree_status.sh
    36  showrun make generate-bindings
    37  SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh
    38  showrun make completions
    39  SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh
    40  
    41  # Defined in Cirrus-CI config.
    42  # shellcheck disable=SC2154
    43  $SCRIPT_BASE/check_go_changes.sh