mirror of
https://github.com/containers/skopeo.git
synced 2025-08-09 02:17:39 +00:00
Travis -> Cirrus: validate, vendor, and test
Also add some basic setup commands to hack/get_ci_vm.sh Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
parent
6b95125757
commit
146af8cd59
78
.cirrus.yml
78
.cirrus.yml
@ -11,7 +11,7 @@ env:
|
|||||||
GOPATH: &gopath "/var/tmp/go"
|
GOPATH: &gopath "/var/tmp/go"
|
||||||
GOBIN: "${GOPATH}/bin"
|
GOBIN: "${GOPATH}/bin"
|
||||||
GOCACHE: "${GOPATH}/cache"
|
GOCACHE: "${GOPATH}/cache"
|
||||||
GOSRC: &gosrc "/var/tmp/go/src/github.com/containers/podman"
|
GOSRC: &gosrc "/var/tmp/go/src/github.com/containers/skopeo"
|
||||||
CIRRUS_WORKING_DIR: *gosrc
|
CIRRUS_WORKING_DIR: *gosrc
|
||||||
# The default is 'sh' if unspecified
|
# The default is 'sh' if unspecified
|
||||||
CIRRUS_SHELL: "/bin/bash"
|
CIRRUS_SHELL: "/bin/bash"
|
||||||
@ -37,6 +37,9 @@ env:
|
|||||||
UBUNTU_CONTAINER_FQIN: "quay.io/libpod/ubuntu_podman:${IMAGE_SUFFIX}"
|
UBUNTU_CONTAINER_FQIN: "quay.io/libpod/ubuntu_podman:${IMAGE_SUFFIX}"
|
||||||
PRIOR_UBUNTU_CONTAINER_FQIN: "quay.io/libpod/prior-ubuntu_podman:${IMAGE_SUFFIX}"
|
PRIOR_UBUNTU_CONTAINER_FQIN: "quay.io/libpod/prior-ubuntu_podman:${IMAGE_SUFFIX}"
|
||||||
|
|
||||||
|
# Equivilent to image produced by 'make build-container'
|
||||||
|
SKOPEO_CI_CONTAINER_FQIN: "quay.io/skopeo/ci:${DEST_BRANCH}"
|
||||||
|
|
||||||
|
|
||||||
# Default timeout for each task
|
# Default timeout for each task
|
||||||
timeout_in: 30m
|
timeout_in: 30m
|
||||||
@ -45,6 +48,76 @@ timeout_in: 30m
|
|||||||
gcp_credentials: ENCRYPTED[52d9e807b531b37ab14e958cb5a72499460663f04c8d73e22ad608c027a31118420f1c80f0be0882fbdf96f49d8f9ac0]
|
gcp_credentials: ENCRYPTED[52d9e807b531b37ab14e958cb5a72499460663f04c8d73e22ad608c027a31118420f1c80f0be0882fbdf96f49d8f9ac0]
|
||||||
|
|
||||||
|
|
||||||
|
validate_task:
|
||||||
|
# The git-validation tool doesn't work well on branch or tag push,
|
||||||
|
# under Cirrus-CI, due to challenges obtaining the starting commit ID.
|
||||||
|
# Only do validation for PRs.
|
||||||
|
only_if: $CIRRUS_PR != ''
|
||||||
|
container: &build_container
|
||||||
|
image: "${SKOPEO_CI_CONTAINER_FQIN}"
|
||||||
|
cpu: 4
|
||||||
|
memory: 8
|
||||||
|
script: make validate-local
|
||||||
|
|
||||||
|
|
||||||
|
vendor_task:
|
||||||
|
only_if: $CIRRUS_PR != ''
|
||||||
|
container: *build_container
|
||||||
|
script: make vendor && ./hack/tree_status.sh
|
||||||
|
|
||||||
|
|
||||||
|
test_task:
|
||||||
|
alias: test
|
||||||
|
depends_on:
|
||||||
|
- validate
|
||||||
|
- vendor
|
||||||
|
gce_instance:
|
||||||
|
image_project: libpod-218412
|
||||||
|
zone: "us-central1-f"
|
||||||
|
cpu: 2
|
||||||
|
memory: "4Gb"
|
||||||
|
# Required to be 200gig, do not modify - has i/o performance impact
|
||||||
|
# according to gcloud CLI tool warning messages.
|
||||||
|
disk: 200
|
||||||
|
image_name: ${FEDORA_CACHE_IMAGE_NAME}
|
||||||
|
matrix:
|
||||||
|
- name: "Skopeo Test"
|
||||||
|
env:
|
||||||
|
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove'
|
||||||
|
- name: "Skopeo Test w/ opengpg"
|
||||||
|
env:
|
||||||
|
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove containers_image_openpgp'
|
||||||
|
env:
|
||||||
|
# TODO: Remove test technical-debt requiring integration tests to run
|
||||||
|
# inside a container and with --privileged. This is hiding bugs!
|
||||||
|
PODMANMAKE: >-
|
||||||
|
podman run -it --rm --privileged
|
||||||
|
-e GOPATH=$GOPATH
|
||||||
|
-v $GOPATH:$GOPATH:Z
|
||||||
|
-w $GOSRC
|
||||||
|
$SKOPEO_CI_CONTAINER_FQIN
|
||||||
|
make
|
||||||
|
setup_script: |
|
||||||
|
# This is required as part of the standard Fedora VM setup
|
||||||
|
growpart /dev/sda 1
|
||||||
|
resize2fs /dev/sda1
|
||||||
|
|
||||||
|
# VM's come with the distro. skopeo pre-installed
|
||||||
|
dnf erase -y skopeo
|
||||||
|
|
||||||
|
# Ensure we start with a clean-slate
|
||||||
|
podman system reset --force
|
||||||
|
# Note: We _HAVE_ to spam BUILDTAGS in this way due to how Cirrus-CI
|
||||||
|
# mangles quoted strings when performing in-line 'env' substitution.
|
||||||
|
main_script: |
|
||||||
|
set -x
|
||||||
|
$PODMANMAKE bin/skopeo BUILDTAGS="$BUILDTAGS"
|
||||||
|
$PODMANMAKE test-unit-local BUILDTAGS="$BUILDTAGS"
|
||||||
|
$PODMANMAKE test-integration-local BUILDTAGS="$BUILDTAGS"
|
||||||
|
# Do not run inside podman, uses containers internally.
|
||||||
|
make test-system-local BUILDTAGS="$BUILDTAGS"
|
||||||
|
|
||||||
|
|
||||||
# This task is critical. It updates the "last-used by" timestamp stored
|
# This task is critical. It updates the "last-used by" timestamp stored
|
||||||
# in metadata for all VM images. This mechanism functions in tandem with
|
# in metadata for all VM images. This mechanism functions in tandem with
|
||||||
# an out-of-band pruning operation to remove disused VM images.
|
# an out-of-band pruning operation to remove disused VM images.
|
||||||
@ -79,6 +152,9 @@ success_task:
|
|||||||
alias: success
|
alias: success
|
||||||
# N/B: ALL tasks must be listed here, minus their '_task' suffix.
|
# N/B: ALL tasks must be listed here, minus their '_task' suffix.
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- validate
|
||||||
|
- vendor
|
||||||
|
- test
|
||||||
- meta
|
- meta
|
||||||
container: *smallcontainer
|
container: *smallcontainer
|
||||||
env:
|
env:
|
||||||
|
@ -67,14 +67,6 @@ jobs:
|
|||||||
- brew update && brew unlink python@2 && brew install gpgme
|
- brew update && brew unlink python@2 && brew install gpgme
|
||||||
script:
|
script:
|
||||||
- hack/travis_osx.sh
|
- hack/travis_osx.sh
|
||||||
- stage: local-build
|
|
||||||
<<: *local-build
|
|
||||||
name: local build for linux
|
|
||||||
os: linux
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
script:
|
|
||||||
- make vendor && ./hack/tree_status.sh && make local-cross && make check
|
|
||||||
|
|
||||||
# Run 3 image-build-push tasks in parallel for linux/amd64, linux/s390x and linux/ppc64le platforms (for upstream and stable)
|
# Run 3 image-build-push tasks in parallel for linux/amd64, linux/s390x and linux/ppc64le platforms (for upstream and stable)
|
||||||
- stage: image-build-push
|
- stage: image-build-push
|
||||||
|
@ -44,7 +44,11 @@ elif [[ "$1" == "--setup" ]]; then
|
|||||||
# get_ci_vm container entrypoint calls us with this option on the
|
# get_ci_vm container entrypoint calls us with this option on the
|
||||||
# Cirrus-CI environment instance, to perform repo.-specific setup.
|
# Cirrus-CI environment instance, to perform repo.-specific setup.
|
||||||
cd $REPO_DIRPATH
|
cd $REPO_DIRPATH
|
||||||
echo "+ No further setup performed" > /dev/stderr
|
echo "+ Growing root filesystem" > /dev/stderr
|
||||||
|
growpart /dev/sda 1
|
||||||
|
resize2fs /dev/sda1
|
||||||
|
echo "+ Erasing pre-installed skopeo package" > /dev/stderr
|
||||||
|
dnf erase -y skopeo
|
||||||
else
|
else
|
||||||
# Create and access VM for specified Cirrus-CI task
|
# Create and access VM for specified Cirrus-CI task
|
||||||
mkdir -p $HOME/.config/gcloud/ssh
|
mkdir -p $HOME/.config/gcloud/ssh
|
||||||
|
Loading…
Reference in New Issue
Block a user