aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-01-31 12:50:27 -0500
committerChris Evich <cevich@redhat.com>2020-03-02 08:50:54 -0500
commitd0782e7839888d9eecdc97e8e885d5f787f5b8a7 (patch)
tree3611ed6dffdab3013c47a92c2d1dca3a7746e70b /.cirrus.yml
parent275e9b855dd0a384a283174912c08f3f097101b5 (diff)
downloadpodman-d0782e7839888d9eecdc97e8e885d5f787f5b8a7.tar.gz
podman-d0782e7839888d9eecdc97e8e885d5f787f5b8a7.tar.bz2
podman-d0782e7839888d9eecdc97e8e885d5f787f5b8a7.zip
Cirrus: Fix gate image & false-positive exits
A number of scripts relating to tooling used and the gate container image were not exiting upon errors as intended. Coupled with external service unavailability (i.e. downloading golangci-lint) was observed to cause difficult to debug failures. This change corrects the scripts inside/out of the gate container as well as fixes many golang related path consistency problems vs other CI jobs. After this change, all jobs use consistent path names reducing the number of special-case overrides needed. Lastly, I also made a documentation-pass, updating/correcting as needed, including documenting a likely local validation-failure mode, related to `$EPOCH_TEST_COMMIT`. This is dependent on the developers git environment, so documentation is the only possible "fix". Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml26
1 files changed, 15 insertions, 11 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 2106ac96d..f1fba220e 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -17,6 +17,7 @@ env:
DEST_BRANCH: "master"
# Overrides default location (/tmp/cirrus) for repo clone
GOPATH: "/var/tmp/go"
+ GOBIN: "${GOPATH}/bin"
GOSRC: "/var/tmp/go/src/github.com/containers/libpod"
CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/libpod"
# The default is 'sh' if unspecified
@@ -85,17 +86,18 @@ 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 run this on PRs, never during post-merge testing (for speed).
only_if: $CIRRUS_BRANCH != $DEST_BRANCH
env:
CIRRUS_WORKING_DIR: "/usr/src/libpod"
- GOPATH: "/go"
- GOSRC: "/go/src/github.com/containers/libpod"
+ SRCPATH: "$CIRRUS_WORKING_DIR"
# Runs within Cirrus's "community cluster"
container:
+ # Note: Image has dual purpose, see contrib/gate/README.md
+ # The entrypoint.sh script ensures a prestine copy of $SRCPATH is
+ # available at $GOSRC before executing make instructions.
image: "quay.io/libpod/gate:master"
cpu: 4
memory: 12
@@ -133,9 +135,9 @@ gating_task:
# Verify some aspects of ci/related scripts
ci_script:
- - '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/lib.sh.t |& ${TIMESTAMP}'
+ - '${GOSRC}/${SCRIPT_BASE}/lib.sh.t |& ${TIMESTAMP}'
- '/usr/local/bin/entrypoint.sh -C ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/packer test'
- - '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/cirrus_yaml_test.py |& ${TIMESTAMP}'
+ - '${GOSRC}/${SCRIPT_BASE}/cirrus_yaml_test.py |& ${TIMESTAMP}'
# Verify expected bash environment (-o pipefail)
pipefail_enabledscript: 'if /bin/false | /bin/true; then echo "pipefail fault" && exit 72; fi'
@@ -217,13 +219,14 @@ varlink_api_task:
env:
CIRRUS_WORKING_DIR: "/usr/src/libpod"
- GOPATH: "/go"
- GOSRC: "/go/src/github.com/containers/libpod"
+ SRCPATH: "$CIRRUS_WORKING_DIR"
+ EPOCH_TEST_COMMIT: "${CIRRUS_BASE_SHA}" # repo clone missing this data
# Used by tree_status.sh
SUGGESTION: 'remove API.md, then "make varlink_api_generate" and commit changes.'
# Runs within Cirrus's "community cluster"
container:
+ # Note: Image has dual purpose, see contrib/gate/README.md
image: "quay.io/libpod/gate:master"
cpu: 4
memory: 12
@@ -749,12 +752,13 @@ success_task:
env:
CIRRUS_WORKING_DIR: "/usr/src/libpod"
- GOPATH: "/go"
- GOSRC: "/go/src/github.com/containers/libpod"
+ SRCPATH: "$CIRRUS_WORKING_DIR"
+ EPOCH_TEST_COMMIT: "${CIRRUS_BASE_SHA}" # repo clone missing this data
container:
+ # Note: Image has dual purpose, see contrib/gate/README.md
image: "quay.io/libpod/gate:master"
cpu: 1
memory: 1
- success_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/success.sh |& ${TIMESTAMP}'
+ success_script: '/usr/local/bin/entrypoint.sh ./$SCRIPT_BASE/success.sh |& ${TIMESTAMP}'