Skip to content

Commit

Permalink
Merge #2115
Browse files Browse the repository at this point in the history
2115: Kill Travis and Enable Bors r=rhatdan a=cevich

***Depends on:***  #1848 #1971 #2036 #2121

Co-authored-by: Ed Santiago <[email protected]>
Co-authored-by: Chris Evich <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2020
2 parents 0ccc4c9 + 3de05a9 commit 5548b38
Show file tree
Hide file tree
Showing 51 changed files with 928 additions and 480 deletions.
248 changes: 195 additions & 53 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,40 @@ env:
####
#### Global variables used for all tasks
####
# Name of the ultimate destination branch for this CI run, PR or post-merge.
DEST_BRANCH: "master"
GOPATH: "/var/tmp/go"
GOSRC: "${GOPATH}/src/github.com/containers/buildah"
# Overrides default location (/tmp/cirrus) for repo clone
CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/buildah"
CIRRUS_WORKING_DIR: "${GOSRC}"
# Shell used to execute all script commands
CIRRUS_SHELL: "/bin/bash"
# Automation script path relative to $CIRRUS_WORKING_DIR)
SCRIPT_BASE: "./contrib/cirrus"
# No need to go crazy, but grab enough to cover most PRs
CIRRUS_CLONE_DEPTH: 50
# Unless set by in_podman.sh, default to operating outside of a podman container
IN_PODMAN: 'false'
# Not cross-compiling by default
CROSS_TARGET: ""

####
#### Cache-image names to test with
####
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
# TODO: Setting up from base-images is very inefficient, use libpod's cache-images instead?
FEDORA_CACHE_IMAGE_NAME: "fedora-cloud-base-30-1-2-1565360543"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-cloud-base-29-1-2-1565360543"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-1904-disco-v20190724" # Latest
PRIOR_UBUNTU_CACHE_IMAGE_NAME: "ubuntu-1804-bionic-v20190722a" # LTS
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-1904-disco-v20190724"
PRIOR_UBUNTU_CACHE_IMAGE_NAME: "ubuntu-1804-bionic-v20190722a"

####
#### Command variables to help avoid duplication
####
# Command to prefix every output line with a timestamp
# (can't do inline awk script, Cirrus-CI or YAML mangles quoting)
_TIMESTAMP: 'awk -f ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk'
_DFCMD: 'df -lhTx tmpfs'
_RAUDITCMD: 'cat /var/log/audit/audit.log'
_UAUDITCMD: 'cat /var/log/kern.log'
_JOURNALCMD: 'journalctl -b'

gcp_credentials: ENCRYPTED[ae0bf7370f0b6e446bc61d0865a2c55d3e166b3fab9466eb0393e38e1c66a31ca4c71ddc7e0139d47d075c36dd6d3fd7]

Expand All @@ -50,79 +55,216 @@ gce_instance:
image_name: "${FEDORA_CACHE_IMAGE_NAME}"


testing_task:
gce_instance: # Only need to specify differences from defaults (above)
matrix: # Duplicate this task for each matrix product.
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
image_name: "${PRIOR_UBUNTU_CACHE_IMAGE_NAME}"
# Update metadata on VM images referenced by this repository state
'cirrus-ci/only_prs/meta_task':

# see bors.toml
skip: >-
$CIRRUS_BRANCH =~ ".*\.tmp" ||
$CIRRUS_BRANCH =~ ".*\.tmp"
container:
image: "quay.io/libpod/imgts:latest" # see contrib/imgts
cpu: 1
memory: 1

env:
# Space-separated list of images used by this repository state
IMGNAMES: |-
${FEDORA_CACHE_IMAGE_NAME}
${PRIOR_FEDORA_CACHE_IMAGE_NAME}
${UBUNTU_CACHE_IMAGE_NAME}
${PRIOR_UBUNTU_CACHE_IMAGE_NAME}
BUILDID: "${CIRRUS_BUILD_ID}"
REPOREF: "${CIRRUS_CHANGE_IN_REPO}"
GCPJSON: ENCRYPTED[d3614d6f5cc0e66be89d4252b3365fd84f14eee0259d4eb47e25fc0bc2842c7937f5ee8c882b7e547b4c5ec4b6733b14]
GCPNAME: ENCRYPTED[8509e6a681b859479ce6aa275bd3c4ac82de5beec6df6057925afc4cd85b7ef2e879066ae8baaa2d453b82958e434578]
GCPPROJECT: ENCRYPTED[cc09b62d0ec6746a3df685e663ad25d9d5af95ef5fd843c96f3d0ec9d7f065dc63216b9c685c9f43a776a1d403991494]
CIRRUS_CLONE_DEPTH: 1 # source not used

script: '/usr/local/bin/entrypoint.sh |& ${_TIMESTAMP}'

# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_and_test_script: '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/build_and_test.sh |& ${_TIMESTAMP}'

# Log collection when job was successful
df_script: '${_DFCMD} || true'
rh_audit_log_script: '${_RAUDITCMD} || true'
ubuntu_audit_log_script: '${_UAUDITCMD} || true'
journal_log_script: '${_JOURNALCMD} || true'
'cirrus-ci/only_prs/gate_task':

# see bors.toml
skip: >-
$CIRRUS_BRANCH =~ ".*\.tmp" ||
$CIRRUS_BRANCH =~ ".*\.tmp"
timeout_in: 30m

on_failure: # Script names must be different from above
failure_df_script: '${_DFCMD} || true'
failure_rh_audit_log_script: '${_RAUDITCMD} || true'
failure_ubuntu_audit_log_script: '${_UAUDITCMD} || true'
failure_journal_log_script: '${_JOURNALCMD} || true'
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
validate_test_script: '${SCRIPT_BASE}/test.sh validate |& ${_TIMESTAMP}'

binary_artifacts:
path: ./bin/*


'cirrus-ci/only_prs/unit_task':

# see .bors.toml
skip: >-
$CIRRUS_BRANCH =~ ".*\.tmp" ||
$CIRRUS_BRANCH =~ ".*\.tmp"
# not supported by bors-ng
# allow_failures: $CI == $CI

timeout_in: 30m

setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
# FIXME: These tests mostly/always fail
unit_test_script: '${SCRIPT_BASE}/test.sh unit |& ${_TIMESTAMP} || true'

binary_artifacts:
path: ./bin/*


# This task runs `make vendor` followed by ./hack/tree_status.sh to check
# whether the git tree is clean. The reasoning for that is to make sure
# that the vendor.conf, the code and the vendored packages in ./vendor are
# in sync at all times.
vendor_task:
'cirrus-ci/only_prs/vendor_task':

only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\*\*\*\s*CIRRUS:\s*TEST\s*IMAGES\s*\*\*\*.*'
# see bors.toml
skip: >-
$CIRRUS_BRANCH =~ ".*\.tmp" ||
$CIRRUS_BRANCH =~ ".*\.tmp"
env:
CIRRUS_WORKING_DIR: "/var/tmp/go/src/github.com/containers/buildah"
GOPATH: "/go"
GOSRC: "/go/src/github.com/containers/buildah"
GOPATH: "/var/tmp/go"
GOSRC: "/var/tmp/go/src/github.com/containers/buildah"

# Runs within Cirrus's "community cluster"
container:
image: docker.io/library/golang:1.13
cpu: 1
memory: 1

timeout_in: 30m
timeout_in: 5m

vendor_script:
- 'cd ${CIRRUS_WORKING_DIR} && make vendor'
- 'cd ${CIRRUS_WORKING_DIR} && ./hack/tree_status.sh'
- 'make vendor'
- './hack/tree_status.sh'

# Update metadata on VM images referenced by this repository state
meta_task:

'cirrus-ci/only_prs/cross_task':

# see bors.toml
skip: >-
$CIRRUS_BRANCH =~ ".*\.tmp" ||
$CIRRUS_BRANCH =~ ".*\.tmp"
depends_on:
- "vendor"
- 'cirrus-ci/only_prs/gate'
- 'cirrus-ci/only_prs/vendor'

container:
image: "quay.io/libpod/imgts:latest" # see contrib/imgts
cpu: 1
memory: 1
image: registry.fedoraproject.org/fedora:30

env:
# Space-separated list of images used by this repository state
IMGNAMES: |-
${FEDORA_CACHE_IMAGE_NAME}
${PRIOR_FEDORA_CACHE_IMAGE_NAME}
${UBUNTU_CACHE_IMAGE_NAME}
${PRIOR_UBUNTU_CACHE_IMAGE_NAME}
BUILDID: "${CIRRUS_BUILD_ID}"
REPOREF: "${CIRRUS_CHANGE_IN_REPO}"
GCPJSON: ENCRYPTED[d3614d6f5cc0e66be89d4252b3365fd84f14eee0259d4eb47e25fc0bc2842c7937f5ee8c882b7e547b4c5ec4b6733b14]
GCPNAME: ENCRYPTED[8509e6a681b859479ce6aa275bd3c4ac82de5beec6df6057925afc4cd85b7ef2e879066ae8baaa2d453b82958e434578]
GCPPROJECT: ENCRYPTED[cc09b62d0ec6746a3df685e663ad25d9d5af95ef5fd843c96f3d0ec9d7f065dc63216b9c685c9f43a776a1d403991494]
CIRRUS_CLONE_DEPTH: 1 # source not used
matrix:
CROSS_TARGET: darwin

script: '/usr/local/bin/entrypoint.sh |& ${_TIMESTAMP}'
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'

binary_artifacts:
path: ./bin/*


'cirrus-ci/required/testing_task':

# see bors.toml
skip: >-
$CIRRUS_BRANCH == "staging.tmp" ||
$CIRRUS_BRANCH == "trying.tmp"
depends_on:
- 'cirrus-ci/only_prs/gate'
- 'cirrus-ci/only_prs/vendor'

gce_instance: # Only need to specify differences from defaults (above)
matrix: # Duplicate this task for each matrix product.
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
# TODO: Re-enable once prior image is F30 and above is F31
# image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
image_name: "${PRIOR_UBUNTU_CACHE_IMAGE_NAME}"

# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'

binary_artifacts:
path: ./bin/*

always: &standardlogs
audit_log_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh audit'
df_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh df'
journal_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh journal'
podman_system_info_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh podman'
buildah_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh buildah_version'
buildah_info_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh buildah_info'
package_versions_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh packages'


'cirrus-ci/required/in_podman_task':

# see bors.toml
skip: >-
$CIRRUS_BRANCH == "staging.tmp" ||
$CIRRUS_BRANCH == "trying.tmp"
depends_on:
- 'cirrus-ci/only_prs/gate'
- 'cirrus-ci/only_prs/vendor'

env:
# This is key, it causes the scripts to re-execute themselves inside a container.
IN_PODMAN: 'true'
BUILDAH_ISOLATION: 'chroot'
STORAGE_DRIVER: 'vfs'
STORAGE_OPTIONS: ''

# Separate scripts for separate outputs, makes debugging easier.
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'

binary_artifacts:
path: ./bin/*

always:
<<: *standardlogs

# TODO: Bors-ng has trouble interpreting multiple status-checks as being required
# when their names contain wild-cards (like `testing%`). Until that issue
# can be fixed, use a single "test" to represent pass/fail status of all
# required checks.
'cirrus-ci/success_task':

# see bors.toml
skip: >-
$CIRRUS_BRANCH == "staging.tmp" ||
$CIRRUS_BRANCH == "trying.tmp"
depends_on:
- "cirrus-ci/required/testing"
- "cirrus-ci/required/in_podman"

env:
CIRRUS_WORKING_DIR: /tmp
CIRRUS_CLONE_DEPTH: 1 # no code is being used by this task

container:
image: "registry.fedoraproject.org/fedora-minimal:latest"
cpu: 1
memory: 1

script: /bin/true
42 changes: 0 additions & 42 deletions .papr.sh

This file was deleted.

Loading

0 comments on commit 5548b38

Please sign in to comment.