diff options
Diffstat (limited to '.cirrus.yml')
-rw-r--r-- | .cirrus.yml | 74 |
1 files changed, 42 insertions, 32 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index b75e99184..5f99b0490 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -17,17 +17,20 @@ env: CIRRUS_SHELL: "/bin/bash" # Save a little typing (path relative to $CIRRUS_WORKING_DIR) SCRIPT_BASE: "./contrib/cirrus" + # Runner statistics log file path/name + STATS_LOGFILE_SFX: 'runner_stats.log' + STATS_LOGFILE: '$GOSRC/${CIRRUS_TASK_NAME}-${STATS_LOGFILE_SFX}' #### #### Cache-image names to test with (double-quotes around names are critical) #### - FEDORA_NAME: "fedora-32" - PRIOR_FEDORA_NAME: "fedora-31" + FEDORA_NAME: "fedora-33" + PRIOR_FEDORA_NAME: "fedora-32" UBUNTU_NAME: "ubuntu-20" PRIOR_UBUNTU_NAME: "ubuntu-19" # Google-cloud VM Images - IMAGE_SUFFIX: "c4948709391728640" + IMAGE_SUFFIX: "c5402398833246208" FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}" UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}" @@ -74,12 +77,12 @@ ext_svc_check_task: env: TEST_FLAVOR: ext_svc CTR_FQIN: ${FEDORA_CONTAINER_FQIN} - setup_script: &setup - - 'cd $GOSRC/$SCRIPT_BASE || exit 1' - - './setup_environment.sh' - main_script: &main - - 'cd $GOSRC/$SCRIPT_BASE || exit 1' - - './runner.sh' + setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh' + main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh' + always: &runner_stats + runner_stats_artifacts: + path: ./*-${STATS_LOGFILE_SFX} + type: text/plain # Execute some quick checks to confirm this YAML file and all @@ -95,6 +98,7 @@ automation_task: TEST_ENVIRON: container setup_script: *setup main_script: *main + always: *runner_stats # This task use to be called 'gating', however that name is being @@ -130,6 +134,7 @@ smoke_task: make install.tools setup_script: *setup main_script: *main + always: *runner_stats # N/B: This task is critical. It builds all binaries and release archives @@ -143,7 +148,6 @@ smoke_task: build_task: alias: 'build' name: 'Build for $DISTRO_NV' - only_if: ¬_docs $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' gce_instance: &standardvm image_project: libpod-218412 zone: "us-central1-a" @@ -189,17 +193,14 @@ build_task: clone_script: &noop mkdir -p $CIRRUS_WORKING_DIR setup_script: *setup main_script: *main - always: &artifacts + always: &binary_artifacts + <<: *runner_stats gosrc_artifacts: path: ./* # Grab everything in top-level $GOSRC type: application/octet-stream binary_artifacts: path: ./bin/* type: application/octet-stream - # Required for `contrib/cirrus/logformatter` to work properly - html_artifacts: - path: ./*.html - type: text/html # Confirm the result of building on at least one platform appears sane. @@ -208,7 +209,6 @@ build_task: validate_task: name: "Validate $DISTRO_NV Build" alias: validate - only_if: *not_docs depends_on: - ext_svc_check - automation @@ -228,7 +228,7 @@ validate_task: clone_script: *noop setup_script: *setup main_script: *main - always: *artifacts + always: *runner_stats # Exercise the "libpod" API with a small set of common @@ -236,7 +236,7 @@ validate_task: bindings_task: name: "Test Bindings" alias: bindings - only_if: *not_docs + only_if: ¬_docs $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' skip: *branch depends_on: - build @@ -248,7 +248,7 @@ bindings_task: clone_script: *noop # Comes from cache setup_script: *setup main_script: *main - always: *artifacts + always: *runner_stats # Build the "libpod" API documentation `swagger.yaml` for eventual @@ -267,7 +267,7 @@ swagger_task: clone_script: *full_clone # build-cache not available to container tasks setup_script: *setup main_script: *main - always: *artifacts + always: *binary_artifacts endpoint_task: @@ -285,7 +285,7 @@ endpoint_task: clone_script: *full_clone # build-cache not available to container tasks setup_script: *setup main_script: *main - always: *artifacts + always: *runner_stats # Check that all included go modules from other sources match @@ -304,7 +304,7 @@ vendor_task: clone_script: *full_clone # build-cache not available to container tasks setup_script: *setup main_script: *main - always: *artifacts + always: *runner_stats # There are several other important variations of podman which @@ -335,7 +335,8 @@ alt_build_task: ALT_NAME: 'Build varlink-binaries' setup_script: *setup main_script: *main - always: *artifacts + always: *binary_artifacts + # Confirm building a statically-linked binary is successful static_alt_build_task: @@ -346,7 +347,7 @@ static_alt_build_task: - build # Community-maintained task, may fail on occasion. If so, uncomment # the next line and file an issue with details about the failure. - # allow_failures: $CI == $CI + allow_failures: $CI == $CI gce_instance: *bigvm env: <<: *stdenvars @@ -361,10 +362,11 @@ static_alt_build_task: # this cache ensures only the static podman binary is built. nix_cache: folder: '/var/cache/nix' - fingerprint_script: cat nix/* + # Cirrus will calculate/use sha of this output as the cache key + fingerprint_script: echo "${IMAGE_SUFFIX}" && cat nix/* setup_script: *setup main_script: *main - always: *artifacts + always: *binary_artifacts # Confirm building the remote client, natively on a Mac OS-X VM. @@ -385,7 +387,7 @@ osx_alt_build_task: - brew install go-md2man - make podman-remote-darwin - make install-podman-remote-darwin-docs - always: *artifacts + always: *binary_artifacts # This task is a stub: In the future it will be used to verify @@ -405,7 +407,7 @@ docker-py_test_task: clone_script: *noop # Comes from cache setup_script: *setup main_script: *main - always: *artifacts + always: *runner_stats # Does exactly what it says, execute the podman unit-tests on all primary @@ -424,7 +426,7 @@ unit_test_task: gopath_cache: *ro_gopath_cache setup_script: *setup main_script: *main - always: *artifacts + always: *runner_stats apiv2_test_task: @@ -441,13 +443,18 @@ apiv2_test_task: setup_script: *setup main_script: *main always: &logs_artifacts - <<: *artifacts + <<: *runner_stats + # Required for `contrib/cirrus/logformatter` to work properly + html_artifacts: + path: ./*.html + type: text/html package_versions_script: '$SCRIPT_BASE/logcollector.sh packages' 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' podman_system_info_script: '$SCRIPT_BASE/logcollector.sh podman' + time_script: '$SCRIPT_BASE/logcollector.sh time' # Execute the podman integration tests on all primary platforms and release @@ -515,6 +522,7 @@ container_integration_test_task: main_script: *main always: *logs_artifacts + # Execute most integration tests as a regular (non-root) user. rootless_integration_test_task: name: *std_name_fmt @@ -584,6 +592,7 @@ rootless_system_test_task: main_script: *main always: *logs_artifacts + # This task is critical. It updates the "last-used by" timestamp stored # in metadata for all VM images. This mechanism functions in tandem with # an out-of-band pruning operation to remove disused VM images. @@ -665,7 +674,8 @@ release_task: clone_script: *noop # Comes from cache setup_script: *setup main_script: *main - always: *artifacts + always: *binary_artifacts + # When preparing to release a new version, this task may be manually # activated at the PR stage to verify the code is in a proper state. @@ -686,4 +696,4 @@ release_test_task: clone_script: *noop # Comes from cache setup_script: *setup main_script: *main - always: *artifacts + always: *binary_artifacts |