summaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml128
1 files changed, 33 insertions, 95 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 848dc2b6d..a56697855 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -21,19 +21,17 @@ env:
CIRRUS_SHELL: "/bin/bash"
# Save a little typing (path relative to $CIRRUS_WORKING_DIR)
SCRIPT_BASE: "./contrib/cirrus"
- # Command to prefix every output line with a timestamp
+ CIRRUS_CLONE_DEPTH: 50
+ # Command to prefix output lines with timing information
# (can't do inline awk script, Cirrus-CI or YAML mangles quoting)
TIMESTAMP: "awk --file ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/timestamp.awk"
- # Command to log critical filesystems, types, and sizes.
- DFCMD: "df -lhTx tmpfs"
- CIRRUS_CLONE_DEPTH: 50
####
#### Cache-image names to test with
###
- FEDORA_CACHE_IMAGE_NAME: "fedora-29-libpod-4844850202017792"
- PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-28-libpod-4844850202017792"
- UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-libpod-4844850202017792"
+ FEDORA_CACHE_IMAGE_NAME: "fedora-30-libpod-5699414987898880"
+ PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-29-libpod-5699414987898880"
+ UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-libpod-5699414987898880"
####
#### Variables for composing new cache-images (used in PR testing) from
@@ -43,7 +41,7 @@ env:
# Git commits to use while building dependencies into cache-images
FEDORA_CNI_COMMIT: "412b6d31280682bb4fab4446f113c22ff1886554"
CNI_COMMIT: "7480240de9749f9a0a5c8614b17f1f03e0c06ab9"
- CONMON_COMMIT: "8455ce1ef385120deb827d0f0588c04357bad4c4"
+ CONMON_COMMIT: "3e47d8dd45cdd973dbe256292d5e9c0bff195e56"
CRIU_COMMIT: "c74b83cd49c00589c0c0468ba5fe685b67fdbd0a"
# Special image w/ nested-libvirt + tools for creating new cache and base images
IMAGE_BUILDER_CACHE_IMAGE_NAME: "image-builder-image-1541772081"
@@ -148,7 +146,6 @@ vendor_task:
timeout_in: 30m
vendor_script:
- - '/usr/local/bin/entrypoint.sh .install.vndr |& ${TIMESTAMP}'
- '/usr/local/bin/entrypoint.sh vendor |& ${TIMESTAMP}'
- 'cd ${GOSRC} && ./hack/tree_status.sh |& ${TIMESTAMP}'
@@ -211,8 +208,9 @@ build_each_commit_task:
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
build_each_commit_script:
+ - 'source $SCRIPT_BASE/lib.sh'
- 'git fetch --depth $CIRRUS_CLONE_DEPTH origin $CIRRUS_BASE_BRANCH |& ${TIMESTAMP}'
- - 'env GOPATH=/var/tmp/go/ make build-all-new-commits GIT_BASE_BRANCH=origin/$CIRRUS_BASE_BRANCH |& ${TIMESTAMP}'
+ - 'make build-all-new-commits GIT_BASE_BRANCH=origin/$CIRRUS_BASE_BRANCH |& ${TIMESTAMP}'
on_failure:
failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
@@ -267,7 +265,7 @@ testing_task:
matrix:
# Images are generated separately, from build_images_task (below)
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
- #image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
+ image_name: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
image_name: "${UBUNTU_CACHE_IMAGE_NAME}"
timeout_in: 120m
@@ -280,18 +278,16 @@ testing_task:
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
unit_test_script: '$SCRIPT_BASE/unit_test.sh |& ${TIMESTAMP}'
integration_test_script: '$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}'
- ginkgo_node_logs_script: 'cat $CIRRUS_WORKING_DIR/test/e2e/ginkgo-node-*.log || echo "Ginkgo node logs not found"'
- df_script: '${DFCMD}'
- audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log'
- journalctl_b_script: 'journalctl -b'
+ system_test_script: '$SCRIPT_BASE/system_test.sh |& ${TIMESTAMP}'
on_failure:
failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
- # Job has already failed, don't fail again and miss collecting data
- failed_ginkgo_node_logs_script: 'cat $CIRRUS_WORKING_DIR/test/e2e/ginkgo-node-*.log || echo "Ginkgo node logs not found"'
- failed_df_script: '${DFCMD}'
- failed_audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log || echo "Uh oh, cat audit.log failed"'
- failed_journalctl_b_script: 'journalctl -b || echo "Uh oh, journalctl -b failed"'
+
+ always: &standardlogs
+ ginkgo_node_logs_script: '$SCRIPT_BASE/logcollector.sh ginkgo'
+ df_script: '$SCRIPT_BASE/logcollector.sh df'
+ audit_log_script: '$SCRIPT_BASE/logcollector.sh audit'
+ journal_script: '$SCRIPT_BASE/logcollector.sh journal'
# This task executes tests under unique environments/conditions
@@ -316,16 +312,14 @@ special_testing_rootless_task:
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
integration_test_script: '$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}'
- df_script: '${DFCMD}'
- audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log'
- journalctl_b_script: 'journalctl -b'
+ system_test_script: '$SCRIPT_BASE/system_test.sh |& ${TIMESTAMP}'
on_failure:
failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
- # Job has already failed, don't fail again and miss collecting data
- failed_df_script: '${DFCMD}'
- failed_audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log || echo "Uh oh, cat audit.log failed"'
- failed_journalctl_b_script: 'journalctl -b || echo "Uh oh, journalctl -b failed"'
+
+ always:
+ <<: *standardlogs
+
special_testing_in_podman_task:
@@ -344,16 +338,12 @@ special_testing_in_podman_task:
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
integration_test_script: '$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}'
- df_script: '${DFCMD}'
- audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log'
- journalctl_b_script: 'journalctl -b'
on_failure:
failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
- # Job has already failed, don't fail again and miss collecting data
- failed_df_script: '${DFCMD}'
- failed_audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log || echo "Uh oh, cat audit.log failed"'
- failed_journalctl_b_script: 'journalctl -b || echo "Uh oh, journalctl -b failed"'
+
+ always:
+ <<: *standardlogs
# Test building of new cache-images for future PR testing, in this PR.
@@ -383,6 +373,12 @@ test_build_cache_images_task:
environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
build_vm_images_script: '$SCRIPT_BASE/build_vm_images.sh |& ${TIMESTAMP}'
+ df_script: '${DFCMD}'
+ journalctl_b_script: 'journalctl -b'
+
+ on_failure:
+ failed_df_script: '${DFCMD}'
+ failed_journalctl_b_script: 'journalctl -b || echo "Uh oh, journalctl -b failed"'
# Test building of new cache-images for future PR testing, in this PR.
@@ -401,8 +397,8 @@ verify_test_built_images_task:
gce_instance:
matrix:
# Images are generated separately, from build_images_task (below)
- #image_name: "fedora-28${BUILT_IMAGE_SUFFIX}"
image_name: "fedora-29${BUILT_IMAGE_SUFFIX}"
+ image_name: "fedora-30${BUILT_IMAGE_SUFFIX}"
image_name: "ubuntu-18${BUILT_IMAGE_SUFFIX}"
env:
@@ -416,66 +412,9 @@ verify_test_built_images_task:
environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
integration_test_script: '$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}'
- ginkgo_node_logs_script: 'cat $CIRRUS_WORKING_DIR/test/e2e/ginkgo-node-*.log || echo "Ginkgo node logs not found"'
- df_script: '${DFCMD}'
- audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log'
- journalctl_b_script: 'journalctl -b'
- on_failure:
- # Job has already failed, don't fail again and miss collecting data
- failed_ginkgo_node_logs_script: 'cat $CIRRUS_WORKING_DIR/test/e2e/ginkgo-node-*.log || echo "Ginkgo node logs not found"'
- failed_df_script: '${DFCMD}'
- failed_audit_log_script: 'cat /var/log/audit/audit.log || cat /var/log/kern.log || echo "Uh oh, cat audit.log failed"'
- failed_journalctl_b_script: 'journalctl -b || echo "Uh oh, journalctl -b failed"'
-
-
-# Build new cache-images for future PR testing, but only after a PR merge.
-# The cache-images save install/setup time needed test every PR. The 'active' images
-# are selected by the 'image_name' items tasks above. Currently this requires
-# manually updating the names, but this could be automated (see comment below).
-build_cache_images_task:
- # Only produce new cache-images after a PR merge, and if a magic string
- # is present in the most recent ___commit-message___.
- only_if: >-
- $CIRRUS_BRANCH == 'master' &&
- $CIRRUS_CHANGE_MESSAGE =~ '.*\*\*\*\s*CIRRUS:\s*REBUILD\s*IMAGES\s*\*\*\*.*'
-
- # Require tests to pass first.
- depends_on:
- - "gating"
- - "testing"
- - "rootless_testing"
-
- # VMs created by packer are not cleaned up by cirrus
- auto_cancellation: $CI != "true"
- gce_instance:
- image_project: "libpod-218412"
- zone: "us-central1-a" # Required by Cirrus for the time being
- cpu: 4
- memory: "4Gb"
- disk: 200
- image_name: "${IMAGE_BUILDER_CACHE_IMAGE_NAME}"
- # Additional permissions for building GCE images, within a GCE VM
- scopes:
- - compute
- - devstorage.full_control
-
- environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
- build_vm_images_script: '$SCRIPT_BASE/build_vm_images.sh |& ${TIMESTAMP}'
-
- # TODO,Continuous Delivery: Automatically open a libpod PR after using 'sed' to replace
- # the image_names with the new (just build) images. That will
- # cause a new round of testing to happen (via the PR) using
- # the new images. When all is good, the PR may be manually
- # merged so all PR testing uses the new images. The script
- # names (below) describe their purpose in this workflow.
- # deploy_images_script:
- # - clone_podman_release_branch.sh
- # - modify_cirrus_yaml_image_names.sh
- # - commit_and_create_upstream_pr.sh
-
- on_failure:
- failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh |& ${TIMESTAMP}'
+ always:
+ <<: *standardlogs
# Post message to IRC if everything passed
@@ -494,7 +433,6 @@ success_task:
- "special_testing_in_podman"
- "test_build_cache_images"
- "verify_test_built_images"
- - "build_cache_images"
env:
CIRRUS_WORKING_DIR: "/usr/src/libpod"