From 12bd7e927cc8b01033f6a9594ccdf0611f96e075 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Wed, 29 Jan 2020 15:38:51 -0500 Subject: Cirrus: Set EPOCH_TEST_COMMIT during gate task For whatever reason, this required variable is not set when `make` is doing validation within automation. Fix this by establishing the value based on data provided from the CI system. Since this data is specific to automation executing against a PR, limit this specific job to not run during testing of branches (post-merge). This is safe since we can assume the PR would not have been merged, if the basics checked during gating did not pass. Signed-off-by: Chris Evich --- .cirrus.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index e1810fab6..bb2da0812 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -85,10 +85,15 @@ gce_instance: # quick format, lint, and unit tests on the standard platform. gating_task: + # Only run this on PRs, never during post-merge testing. This is also required + # for proper setting of EPOCH_TEST_COMMIT value, required by validation tools. + only_if: $CIRRUS_BRANCH != $DEST_BRANCH + env: CIRRUS_WORKING_DIR: "/usr/src/libpod" GOPATH: "/go" GOSRC: "/go/src/github.com/containers/libpod" + EPOCH_TEST_COMMIT: "${CIRRUS_BASE_SHA}" # Runs within Cirrus's "community cluster" container: -- cgit v1.2.3-54-g00ecf