aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml176
1 files changed, 140 insertions, 36 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 4521866d1..7bc00dbb5 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -27,11 +27,17 @@ env:
####
#### Cache-image names to test with
###
- FEDORA_CACHE_IMAGE_NAME: "fedora-29-libpod-7f4cd1f7"
- PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-28-libpod-7f4cd1f7"
- UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-libpod-84514d8b"
+ ACTIVE_CACHE_IMAGE_NAMES: >-
+ fedora-28-libpod-6318419153518592
+ fedora-29-libpod-6318419153518592
+ ubuntu-18-libpod-6318419153518592
+ rhel-7-libpod-6318419153518592
+ image-builder-image-1541772081
+ FEDORA_CACHE_IMAGE_NAME: "fedora-29-libpod-6318419153518592"
+ PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-28-libpod-6318419153518592"
+ UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-libpod-6318419153518592"
+ PRIOR_RHEL_CACHE_IMAGE_NAME: "rhel-7-libpod-6318419153518592"
# RHEL_CACHE_IMAGE_NAME: "rhel-8-notready"
- PRIOR_RHEL_CACHE_IMAGE_NAME: "rhel-7-libpod-7f4cd1f7"
# CENTOS_CACHE_IMAGE_NAME: "centos-7-notready"
####
@@ -61,6 +67,11 @@ env:
RHEL_BASE_IMAGE: "rhel-guest-image-7-6-210-x86-64-qcow2-1548099756"
####
+ #### Default to NOT running in rootless-testing mode
+ ####
+ ROOTLESS_USER: ""
+
+ ####
#### Credentials and other secret-sauces, decrypted at runtime when authorized.
####
# Freenode IRC credentials for posting status messages
@@ -88,7 +99,7 @@ env:
CIRRUS_TASK_ID CIRRUS_REPO_NAME CIRRUS_REPO_OWNER CIRRUS_REPO_FULL_NAME
CIRRUS_REPO_CLONE_URL CIRRUS_SHELL CIRRUS_USER_COLLABORATOR CIRRUS_USER_PERMISSION
CIRRUS_WORKING_DIR CIRRUS_HTTP_CACHE_HOST PACKER_BUILDS BUILT_IMAGE_SUFFIX
- XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID
+ XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID ROOTLESS_USER
# Every *_task runs in parallel in separate VMsd. The name prefix only for reference
@@ -98,6 +109,7 @@ gating_task:
env:
CIRRUS_WORKING_DIR: "/usr/src/libpod"
+ GOSRC: "/go/src/github.com/containers/libpod"
# Runs within Cirrus's "community cluster"
container:
@@ -105,23 +117,55 @@ gating_task:
cpu: 4
memory: 12
+ timeout_in: 20m
+
gate_script:
+ # N/B: entrypoint.sh resets $GOSRC (same as make clean)
- '/usr/local/bin/entrypoint.sh validate'
- '/usr/local/bin/entrypoint.sh lint'
+ - '${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/test/test_dot_cirrus_yaml.py'
+
+ # This task builds Podman with different buildtags to ensure the build does
+ # not break. It also verifies all sub-commands have man pages.
+ build_script:
+ - '/usr/local/bin/entrypoint.sh podman'
+ - 'cd $GOSRC && ./hack/podman-commands.sh'
+ # N/B: need 'clean' so some commited files are re-generated.
+ - '/usr/local/bin/entrypoint.sh clean podman-remote'
+ - '/usr/local/bin/entrypoint.sh clean podman BUILDTAGS="exclude_graphdriver_devicemapper selinux seccomp"'
+ - '/usr/local/bin/entrypoint.sh podman-remote-darwin'
+
+ on_failure:
+ master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
+
+
+# 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:
+
+ depends_on:
+ - "gating"
+
+ env:
+ CIRRUS_WORKING_DIR: "/usr/src/libpod"
+
+ # Runs within Cirrus's "community cluster"
+ container:
+ image: "quay.io/libpod/gate:latest"
+ cpu: 4
+ memory: 12
+
+ timeout_in: 30m
- # 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_script:
- '/usr/local/bin/entrypoint.sh .install.vndr'
- '/usr/local/bin/entrypoint.sh vendor'
- 'cd /go/src/github.com/containers/libpod && ./hack/tree_status.sh'
- # This task builds Podman with different buildtags to ensure the build does
- # not break.
- build_script:
- - '/usr/local/bin/entrypoint.sh clean podman BUILDTAGS="exclude_graphdriver_devicemapper selinux seccomp"'
+ on_failure:
+ master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
build_each_commit_task:
@@ -138,15 +182,41 @@ build_each_commit_task:
cpu: 2
memory: "4Gb"
disk: 40
- matrix:
- image_name: "${FEDORA_CACHE_IMAGE_NAME}"
+ image_name: "${FEDORA_CACHE_IMAGE_NAME}"
timeout_in: 30m
- script:
- - $SCRIPT_BASE/setup_environment.sh
- - git fetch --depth $CIRRUS_CLONE_DEPTH origin $CIRRUS_BASE_BRANCH
- - env GOPATH=/var/tmp/go/ make build-all-new-commits GIT_BASE_BRANCH=origin/$CIRRUS_BASE_BRANCH
+ setup_environment_script: '$SCRIPT_BASE/setup_environment.sh'
+ build_each_commit_script:
+ - 'git fetch --depth $CIRRUS_CLONE_DEPTH origin $CIRRUS_BASE_BRANCH'
+ - 'env GOPATH=/var/tmp/go/ make build-all-new-commits GIT_BASE_BRANCH=origin/$CIRRUS_BASE_BRANCH'
+
+ on_failure:
+ master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
+
+
+# Update metadata on VM images referenced by this repository state
+meta_task:
+
+ depends_on:
+ - "gating"
+
+ 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: "${ACTIVE_CACHE_IMAGE_NAMES}"
+ BUILDID: "${CIRRUS_BUILD_ID}"
+ REPOREF: "${CIRRUS_CHANGE_IN_REPO}"
+ GCPJSON: ENCRYPTED[950d9c64ad78f7b1f0c7e499b42dc058d2b23aa67e38b315e68f557f2aba0bf83068d4734f7b1e1bdd22deabe99629df]
+ GCPNAME: ENCRYPTED[b05d469a0dba8cb479cb00cc7c1f6747c91d17622fba260a986b976aa6c817d4077eacffd4613d6d5f23afc4084fab1d]
+ GCPPROJECT: ENCRYPTED[7c80e728e046b1c76147afd156a32c1c57d4a1ac1eab93b7e68e718c61ca8564fc61fef815952b8ae0a64e7034b8fe4f]
+ CIRRUS_CLONE_DEPTH: 1 # source not used
+
+ script: '/usr/local/bin/entrypoint.sh'
# This task does the unit and integration testing for every platform
@@ -169,9 +239,9 @@ testing_task:
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
- image_name: "${PRIOR_RHEL_CACHE_IMAGE_NAME}"
- # TODO: tests fail
+ # TODO: Make these work (also optional_testing_task below)
+ # image_name: "${PRIOR_RHEL_CACHE_IMAGE_NAME}"
# image_name: "${RHEL_CACHE_IMAGE_NAME}"
# image_name: "${CENTOS_CACHE_IMAGE_NAME}"
@@ -179,14 +249,43 @@ testing_task:
# Every *_script runs in sequence, for each task. The name prefix is for
# WebUI reference. The values may be strings...
- setup_environment_script: $SCRIPT_BASE/setup_environment.sh
+ setup_environment_script: '$SCRIPT_BASE/setup_environment.sh'
+ unit_test_script: '$SCRIPT_BASE/unit_test.sh'
+ integration_test_script: '$SCRIPT_BASE/integration_test.sh'
+
+ on_failure:
+ master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
+
+
+# This task executes tests as a regular user on a system
+rootless_testing_task:
+
+ depends_on:
+ - "gating"
+ - "build_each_commit"
+
+ gce_instance:
+ image_project: "libpod-218412"
+ zone: "us-central1-a" # Required by Cirrus for the time being
+ cpu: 2
+ memory: "4Gb"
+ disk: 200
+ # A matrix could be used here, for now just one VM
+ image_name: "${FEDORA_CACHE_IMAGE_NAME}"
+
+ env:
+ ROOTLESS_USER: "olympiclongjumpingwithjesus"
+
+ timeout_in: 120m
- # ...or lists of strings
- unit_test_script:
- - go version
- - $SCRIPT_BASE/unit_test.sh
+ setup_environment_script: '$SCRIPT_BASE/setup_environment.sh'
+ rootless_test_script: >-
+ ssh $ROOTLESS_USER@localhost
+ -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o CheckHostIP=no
+ $CIRRUS_WORKING_DIR/$SCRIPT_BASE/rootless_test.sh
- integration_test_script: $SCRIPT_BASE/integration_test.sh
+ on_failure:
+ master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
# Because system tests are stored within the repository, it is sometimes
@@ -206,15 +305,15 @@ optional_testing_task:
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
- image_name: "${PRIOR_RHEL_CACHE_IMAGE_NAME}"
- # TODO: Make these work (also build_images_task below)
+ # TODO: Make these work (also testing_task above)
# image_name: "${RHEL_CACHE_IMAGE_NAME}"
+ # image_name: "${PRIOR_RHEL_CACHE_IMAGE_NAME}"
# image_name: "${CENTOS_CACHE_IMAGE_NAME}"
timeout_in: 60m
- setup_environment_script: $SCRIPT_BASE/setup_environment.sh
- system_test_script: $SCRIPT_BASE/system_test.sh
+ setup_environment_script: '$SCRIPT_BASE/setup_environment.sh'
+ system_test_script: '$SCRIPT_BASE/system_test.sh'
# Build new cache-images for future PR testing, but only after a PR merge.
@@ -247,8 +346,8 @@ cache_images_task:
scopes:
- compute
- devstorage.full_control
- environment_script: $SCRIPT_BASE/setup_environment.sh
- build_vm_images_script: $SCRIPT_BASE/build_vm_images.sh
+ environment_script: '$SCRIPT_BASE/setup_environment.sh'
+ build_vm_images_script: '$SCRIPT_BASE/build_vm_images.sh'
# TODO,Continuous Delivery: Automatically open a libpod PR after using 'sed' to replace
# the image_names with the new (just build) images. That will
@@ -261,16 +360,21 @@ cache_images_task:
# - modify_cirrus_yaml_image_names.sh
# - commit_and_create_upstream_pr.sh
+ on_failure:
+ master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
+
# Post message to IRC if everything passed
success_task:
+ only_if: $CIRRUS_BRANCH != 'master'
+
depends_on: # ignores any dependent task conditions
- "gating"
- - "vendor_check"
+ - "build_each_commit_task"
- "testing"
+ - "rootless_testing_task"
- "optional_testing"
- - "cache_images"
env:
CIRRUS_WORKING_DIR: "/usr/src/libpod"
@@ -280,4 +384,4 @@ success_task:
cpu: 1
memory: 1
- success_script: $SCRIPT_BASE/success.sh
+ success_script: '$SCRIPT_BASE/success.sh'