Files
Aditya Rajan 222b62e7b0 vendor: Bump github.com/containers/buildah from 1.22.3 to 1.23.0
[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-15 13:30:49 +05:30

371 lines
10 KiB
YAML

---
# Main collection of env. vars to set for all tasks and scripts.
env:
####
#### Global variables used for all tasks
####
# Name of the ultimate destination branch for this CI run, PR or post-merge.
DEST_BRANCH: "main"
GOPATH: "/var/tmp/go"
GOSRC: "${GOPATH}/src/github.com/containers/buildah"
# Overrides default location (/tmp/cirrus) for repo clone
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'
####
#### Cache-image names to test with
####
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
FEDORA_NAME: "fedora-34"
PRIOR_FEDORA_NAME: "fedora-33"
UBUNTU_NAME: "ubuntu-2104"
PRIOR_UBUNTU_NAME: "ubuntu-2010"
IMAGE_SUFFIX: "c6248193773010944"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
PRIOR_UBUNTU_CACHE_IMAGE_NAME: "prior-ubuntu-${IMAGE_SUFFIX}"
IN_PODMAN_IMAGE: "quay.io/libpod/fedora_podman:${IMAGE_SUFFIX}"
####
#### 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'
gcp_credentials: ENCRYPTED[ae0bf7370f0b6e446bc61d0865a2c55d3e166b3fab9466eb0393e38e1c66a31ca4c71ddc7e0139d47d075c36dd6d3fd7]
# Default timeout for each task
timeout_in: 120m
# Default VM to use unless set or modified by task
gce_instance:
image_project: "${IMAGE_PROJECT}"
zone: "us-central1-c" # Required by Cirrus for the time being
cpu: 2
memory: "4Gb"
disk: 200 # Gigabytes, do not set less than 200 per obscure GCE docs re: I/O performance
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
# Update metadata on VM images referenced by this repository state
meta_task:
name: "VM img. keepalive"
alias: meta
container:
image: "quay.io/libpod/imgts:${IMAGE_SUFFIX}" # 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}'
smoke_task:
alias: 'smoke'
name: "Smoke Test"
gce_instance:
memory: "12Gb"
# N/B: Skip running this on branches due to multiple bugs in
# the git-validate tool which are difficult to debug and fix.
skip: $CIRRUS_PR == ''
timeout_in: 30m
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/*
# Check that all included go modules from other sources match
# # what is expected in `vendor/modules.txt` vs `go.mod`.
vendor_task:
name: "Test Vendoring"
alias: vendor
env:
CIRRUS_WORKING_DIR: "/var/tmp/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.16
cpu: 1
memory: 1
timeout_in: 5m
vendor_script:
- 'make vendor'
- './hack/tree_status.sh'
unit_task:
name: 'Unit tests w/ $STORAGE_DRIVER'
alias: unit
only_if: &not_docs $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*'
depends_on:
- smoke
- vendor
timeout_in: 1h
matrix:
- env:
STORAGE_DRIVER: 'vfs'
- env:
STORAGE_DRIVER: 'overlay'
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
unit_test_script: '${SCRIPT_BASE}/test.sh unit |& ${_TIMESTAMP}'
binary_artifacts:
path: ./bin/*
conformance_task:
name: 'Build Conformance w/ $STORAGE_DRIVER'
alias: conformance
only_if: *not_docs
depends_on:
- unit
gce_instance:
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
timeout_in: 25m
matrix:
- env:
STORAGE_DRIVER: 'vfs'
- env:
STORAGE_DRIVER: 'overlay'
setup_script: '${SCRIPT_BASE}/setup.sh conformance |& ${_TIMESTAMP}'
conformance_test_script: '${SCRIPT_BASE}/test.sh conformance |& ${_TIMESTAMP}'
# Confirm cross-compile ALL architectures on a Mac OS-X VM.
cross_build_task:
name: "Cross Compile"
alias: cross_build
only_if: *not_docs
depends_on:
- unit
osx_instance:
image: 'big-sur-base'
script:
- brew update
- brew install go
- brew install go-md2man
- brew install gpgme
- go version
- make cross CGO_ENABLED=0
binary_artifacts:
path: ./bin/*
static_build_task:
name: "Static Build"
alias: static_build
only_if: *not_docs
depends_on:
- unit
gce_instance:
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
cpu: 8
memory: 12
disk: 200
env:
NIX_FQIN: "docker.io/nixos/nix:latest"
init_script: |
set -ex
setenforce 0
growpart /dev/sda 1 || true
resize2fs /dev/sda1 || true
yum -y install podman
nix_cache:
folder: '.cache'
fingerprint_script: cat nix/*
build_script: |
set -ex
mkdir -p .cache
mv .cache /nix
if [[ -z $(ls -A /nix) ]]; then
podman run --rm --privileged -i -v /:/mnt \
$NIX_FQIN \
cp -rfT /nix /mnt/nix
fi
podman run --rm --privileged -i -v /nix:/nix \
-v ${PWD}:${PWD} -w ${PWD} \
$NIX_FQIN \
nix --print-build-logs --option cores 8 \
--option max-jobs 8 build --file nix/
binaries_artifacts:
path: "result/bin/buildah"
save_cache_script: |
mv /nix .cache
chown -Rf $(whoami) .cache
integration_task:
name: "Integration $DISTRO_NV w/ $STORAGE_DRIVER"
alias: integration
only_if: *not_docs
depends_on:
- unit
matrix:
# VFS
- env:
DISTRO_NV: "${FEDORA_NAME}"
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'vfs'
- env:
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'vfs'
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'vfs'
- env:
DISTRO_NV: "${PRIOR_UBUNTU_NAME}"
IMAGE_NAME: "${PRIOR_UBUNTU_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'vfs'
# OVERLAY
- env:
DISTRO_NV: "${FEDORA_NAME}"
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
- env:
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
- env:
DISTRO_NV: "${UBUNTU_NAME}"
IMAGE_NAME: "${UBUNTU_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
- env:
DISTRO_NV: "${PRIOR_UBUNTU_NAME}"
IMAGE_NAME: "${PRIOR_UBUNTU_CACHE_IMAGE_NAME}"
STORAGE_DRIVER: 'overlay'
gce_instance:
image_name: "$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'
golang_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh golang'
in_podman_task:
name: "Containerized Integration"
alias: in_podman
only_if: *not_docs
depends_on:
- unit
env:
# This is key, cause the scripts to re-execute themselves inside a container.
IN_PODMAN: 'true'
BUILDAH_ISOLATION: 'chroot'
STORAGE_DRIVER: 'vfs'
# 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
# Status aggregator for all tests. This task simply ensures a defined
# set of tasks all passed, and allows confirming that based on the status
# of this task.
success_task:
name: "Total Success"
alias: success
depends_on:
- meta
- smoke
- unit
- conformance
- vendor
- cross_build
- integration
- in_podman
- static_build
container:
image: "quay.io/libpod/alpine:latest"
cpu: 1
memory: 1
env:
CIRRUS_SHELL: direct # execute command directly
clone_script: mkdir -p $CIRRUS_WORKING_DIR
script: /bin/true