diff --git a/.cirrus.yml b/.cirrus.yml index f47fd4b5a1..37805bc69c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -71,7 +71,7 @@ env: # Default timeout for each task -timeout_in: 60m +timeout_in: 20m gcp_credentials: ENCRYPTED[a28959877b2c9c36f151781b0a05407218cda646c7d047fc556e42f55e097e897ab63ee78369dae141dcf0b46a9d0cdd] @@ -240,15 +240,15 @@ alt_build_task: # binary and archive installation zip file. ALT_NAME: 'Windows Cross' # N/B: Referenced by URLencoded strings elsewhere - env: - ALT_NAME: 'Alt Arch. x86 Cross' # N/B: Referenced by URLencoded strings elsewhere + ALT_NAME: 'Alt Arch. x86 Cross' - env: - ALT_NAME: 'Alt Arch. ARM Cross' # N/B: Referenced by URLencoded strings elsewhere + ALT_NAME: 'Alt Arch. ARM Cross' - env: - ALT_NAME: 'Alt Arch. MIPS Cross' # N/B: Referenced by URLencoded strings elsewhere + ALT_NAME: 'Alt Arch. MIPS Cross' - env: - ALT_NAME: 'Alt Arch. MIPS64 Cross' # N/B: Referenced by URLencoded strings elsewhere + ALT_NAME: 'Alt Arch. MIPS64 Cross' - env: - ALT_NAME: 'Alt Arch. Other Cross' # N/B: Referenced by URLencoded strings elsewhere + ALT_NAME: 'Alt Arch. Other Cross' # This task cannot make use of the shared repo.tbz artifact. clone_script: *full_clone setup_script: *setup @@ -559,9 +559,6 @@ apiv2_test_task: (changesInclude('**/*.go', '**/*.c', '**/*.h') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build gce_instance: *standardvm - # Test is normally pretty quick, about 10-minutes. If it hangs, - # don't make developers wait the full 1-hour timeout. - timeout_in: 20m env: <<: *stdenvars TEST_FLAVOR: apiv2 @@ -628,7 +625,6 @@ local_integration_test_task: &local_integration_test_task gce_instance: &fastvm <<: *standardvm cpu: 4 - timeout_in: 30m env: TEST_FLAVOR: int clone_script: *get_gosrc @@ -639,9 +635,6 @@ local_integration_test_task: &local_integration_test_task ginkgo_node_logs_artifacts: path: ./test/e2e/ginkgo-node-*.log type: text/plain - ginkgo_json_artifacts: - path: ./ginkgo-e2e.json - type: application/json # Nearly identical to `local_integration_test` except all operations @@ -674,7 +667,6 @@ container_integration_test_task: CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN} CI_DESIRED_DATABASE: boltdb gce_instance: *fastvm - timeout_in: 30m env: TEST_FLAVOR: int TEST_ENVIRON: container @@ -693,7 +685,6 @@ rootless_integration_test_task: depends_on: *build matrix: *platform_axis gce_instance: *fastvm - timeout_in: 30m env: TEST_FLAVOR: int PRIV_NAME: rootless @@ -719,6 +710,7 @@ podman_machine_task: image: "${VM_IMAGE_NAME}" type: "${EC2_INST_TYPE}" region: us-east-1 + timeout_in: 30m env: EC2_INST_TYPE: "m5zn.metal" # Bare-metal instance is required TEST_FLAVOR: "machine-linux" @@ -738,6 +730,7 @@ podman_machine_aarch64_task: depends_on: *build ec2_instance: <<: *standard_build_ec2_aarch64 + timeout_in: 30m env: TEST_FLAVOR: "machine-linux" EC2_INST_TYPE: c6g.metal @@ -772,6 +765,7 @@ podman_machine_windows_task: <<: *windows type: m5zn.metal platform: windows + timeout_in: 45m env: *winenv matrix: - env: @@ -794,6 +788,7 @@ podman_machine_mac_task: skip: *skip_rhel_release depends_on: *build persistent_worker: *mac_pw + timeout_in: 35m env: <<: *mac_env DISTRO_NV: "darwin" @@ -850,6 +845,7 @@ local_system_test_task: &local_system_test_task depends_on: *build matrix: *platform_axis gce_instance: *standardvm + timeout_in: 35m env: TEST_FLAVOR: sys clone_script: *get_gosrc @@ -864,8 +860,8 @@ local_system_test_aarch64_task: &local_system_test_task_aarch64 # Docs: ./contrib/cirrus/CIModes.md only_if: *only_if_system_test depends_on: *build - persistent_worker: *mac_pw ec2_instance: *standard_build_ec2_aarch64 + timeout_in: 35m env: <<: *stdenvars_aarch64 TEST_FLAVOR: sys @@ -903,6 +899,7 @@ rootless_remote_system_test_task: <<: *local_system_test_task alias: rootless_remote_system_test gce_instance: *standardvm + timeout_in: 35m env: TEST_FLAVOR: sys PODBIN_NAME: remote @@ -917,6 +914,7 @@ rootless_system_test_task: depends_on: *build matrix: *platform_axis gce_instance: *standardvm + timeout_in: 35m env: TEST_FLAVOR: sys PRIV_NAME: rootless @@ -1118,36 +1116,6 @@ artifacts_task: - $ARTCURL/Build%20for%20${FEDORA_NAME}/repo/repo.tbz - tar xjf repo.tbz - cp ./bin/* $CIRRUS_WORKING_DIR/ - alt_binaries_intel_script: - - mkdir -p /tmp/alt - - cd /tmp/alt - - $ARTCURL/Alt%20Arch.%20x86%20Cross/repo/repo.tbz - - tar xjf repo.tbz - - mv ./*.tar.gz $CIRRUS_WORKING_DIR/ - alt_binaries_arm_script: - - mkdir -p /tmp/alt - - cd /tmp/alt - - $ARTCURL/Alt%20Arch.%20ARM%20Cross/repo/repo.tbz - - tar xjf repo.tbz - - mv ./*.tar.gz $CIRRUS_WORKING_DIR/ - alt_binaries_mips_script: - - mkdir -p /tmp/alt - - cd /tmp/alt - - $ARTCURL/Alt%20Arch.%20MIPS%20Cross/repo/repo.tbz - - tar xjf repo.tbz - - mv ./*.tar.gz $CIRRUS_WORKING_DIR/ - alt_binaries_mips64_script: - - mkdir -p /tmp/alt - - cd /tmp/alt - - $ARTCURL/Alt%20Arch.%20MIPS64%20Cross/repo/repo.tbz - - tar xjf repo.tbz - - mv ./*.tar.gz $CIRRUS_WORKING_DIR/ - alt_binaries_other_script: - - mkdir -p /tmp/alt - - cd /tmp/alt - - $ARTCURL/Alt%20Arch.%20Other%20Cross/repo/repo.tbz - - tar xjf repo.tbz - - mv ./*.tar.gz $CIRRUS_WORKING_DIR/ win_binaries_script: - mkdir -p /tmp/win - cd /tmp/win diff --git a/DOWNLOADS.md b/DOWNLOADS.md index def26314cc..c5e25ab8fd 100644 --- a/DOWNLOADS.md +++ b/DOWNLOADS.md @@ -52,13 +52,3 @@ matches corresponding changes in the artifacts task. and [darwin_arm64](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-remote-release-darwin_arm64.zip). * Windows [podman-remote](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-remote-release-windows_amd64.zip) for x86_64 only. -* Other podman-remote release builds (includes configuration files & documentation): - * [podman-release-386.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-386.tar.gz) - * [podman-release-arm.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-arm.tar.gz) - * [podman-release-arm64.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-arm64.tar.gz) - * [podman-release-mips.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-mips.tar.gz) - * [podman-release-mips64.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-mips64.tar.gz) - * [podman-release-mips64le.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-mips64le.tar.gz) - * [podman-release-mipsle.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-mipsle.tar.gz) - * [podman-release-ppc64le.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-ppc64le.tar.gz) - * [podman-release-s390x.tar.gz](https://api.cirrus-ci.com/v1/artifact/github/containers/podman/Artifacts/binary/podman-release-s390x.tar.gz) diff --git a/Makefile b/Makefile index 65b5615bc8..db73caae6e 100644 --- a/Makefile +++ b/Makefile @@ -136,8 +136,6 @@ GINKGOTIMEOUT ?= -timeout=90m GINKGOWHAT ?= test/e2e/. GINKGO_PARALLEL=y GINKGO ?= ./test/tools/build/ginkgo -# ginkgo json output is only useful in CI, not on developer runs -GINKGO_JSON ?= $(if $(CI),--json-report ginkgo-e2e.json,) # Allow control over some Ginkgo parameters GINKGO_FLAKE_ATTEMPTS ?= 0 @@ -652,7 +650,7 @@ ginkgo-run: .install.ginkgo $(GINKGO) version $(GINKGO) -vv $(TESTFLAGS) --tags "$(TAGS) remote" $(GINKGOTIMEOUT) --flake-attempts $(GINKGO_FLAKE_ATTEMPTS) \ --trace $(if $(findstring y,$(GINKGO_NO_COLOR)),--no-color,) \ - $(GINKGO_JSON) $(if $(findstring y,$(GINKGO_PARALLEL)),-p,) $(if $(FOCUS),--focus "$(FOCUS)",) \ + $(if $(findstring y,$(GINKGO_PARALLEL)),-p,) $(if $(FOCUS),--focus "$(FOCUS)",) \ $(if $(FOCUS_FILE),--focus-file "$(FOCUS_FILE)",) $(GINKGOWHAT) .PHONY: ginkgo diff --git a/contrib/cirrus/prebuild.sh b/contrib/cirrus/prebuild.sh index 65c254f556..e475d93442 100755 --- a/contrib/cirrus/prebuild.sh +++ b/contrib/cirrus/prebuild.sh @@ -65,12 +65,6 @@ if [[ "${DISTRO_NV}" == "$PRIOR_FEDORA_NAME" ]]; then # Tests for pr-should-link-jira showrun ${SCRIPT_BASE}/pr-should-link-jira.t - msg "Checking renovate config." - showrun podman run -it \ - -v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \ - ghcr.io/renovatebot/renovate:latest \ - renovate-config-validator - # Run this during daily cron job to prevent a GraphQL API change/breakage # from impacting every PR. Down-side being if it does fail, a maintainer # will need to do some archaeology to find it. @@ -81,19 +75,3 @@ if [[ "${DISTRO_NV}" == "$PRIOR_FEDORA_NAME" ]]; then showrun bash ${CIRRUS_WORKING_DIR}/.github/actions/check_cirrus_cron/test.sh fi fi - -msg "Checking 3rd party network service connectivity" -# shellcheck disable=SC2154 -cat ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/required_host_ports.txt | \ - while read host port - do - if [[ "$port" -eq "443" ]] - then - echo "SSL/TLS to $host:$port" - echo -n '' | \ - err_retry 9 1000 "" openssl s_client -quiet -no_ign_eof -connect $host:$port - else - echo "Connect to $host:$port" - err_retry 9 1000 1 nc -zv -w 13 $host $port - fi - done diff --git a/contrib/cirrus/required_host_ports.txt b/contrib/cirrus/required_host_ports.txt deleted file mode 100644 index 5f066e059c..0000000000 --- a/contrib/cirrus/required_host_ports.txt +++ /dev/null @@ -1,5 +0,0 @@ -github.com 22 -docker.io 443 -quay.io 443 -registry.fedoraproject.org 443 -podman.cachix.org 443 diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 5c9209221b..ea6235eba4 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -22,6 +22,10 @@ source $(dirname $0)/lib.sh showrun echo "starting" function _run_validate-source() { + # This target is only meant to be run on PRs. + # We need the following env vars set for the git diff check below. + req_env_vars CIRRUS_CHANGE_IN_REPO PR_BASE_SHA + showrun make validate-source # make sure PRs have tests @@ -29,11 +33,25 @@ function _run_validate-source() { # make sure PRs have jira links (if needed for branch) showrun make test-jira-links-included + + # shellcheck disable=SC2154 + head=$CIRRUS_CHANGE_IN_REPO + # shellcheck disable=SC2154 + base=$PR_BASE_SHA + echo "_run_validate-source: head=$head base=$base" + diffs=$(git diff --name-only $base $head) + + # If PR touches renovate config validate it, as the image is very big only do so when needed + if grep -E -q "^.github/renovate.json5" <<<"$diffs"; then + msg "Checking renovate config." + showrun podman run \ + -v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \ + ghcr.io/renovatebot/renovate:latest \ + renovate-config-validator + fi } function _run_unit() { - _bail_if_test_can_be_skipped test/goecho test/version - # shellcheck disable=SC2154 if [[ "$PODBIN_NAME" != "podman" ]]; then # shellcheck disable=SC2154 @@ -43,8 +61,6 @@ function _run_unit() { } function _run_apiv2() { - _bail_if_test_can_be_skipped test/apiv2 - ( showrun make localapiv2-bash source .venv/requests/bin/activate @@ -53,8 +69,6 @@ function _run_apiv2() { } function _run_compose_v2() { - _bail_if_test_can_be_skipped test/compose - showrun ./test/compose/test-compose |& logformatter } @@ -67,8 +81,6 @@ function _run_sys() { } function _run_upgrade_test() { - _bail_if_test_can_be_skipped test/system test/upgrade - showrun bats test/upgrade |& logformatter } @@ -101,7 +113,6 @@ function _run_endpoint() { } function _run_farm() { - _bail_if_test_can_be_skipped test/farm test/system msg "Testing podman farm." showrun bats test/farm |& logformatter } @@ -225,16 +236,11 @@ function _run_build() { } function _run_altbuild() { - # Subsequent windows-based tasks require a build. Var. defined in .cirrus.yml - # shellcheck disable=SC2154 - if [[ ! "$ALT_NAME" =~ Windows ]]; then - # We can skip all these steps for test-only PRs, but not doc-only ones - _bail_if_test_can_be_skipped docs - fi - local -a arches local arch req_env_vars ALT_NAME + # Var. defined in .cirrus.yml + # shellcheck disable=SC2154 msg "Performing alternate build: $ALT_NAME" msg "************************************************************" set -x @@ -275,16 +281,10 @@ function _run_altbuild() { showrun make package ;; Alt*x86*Cross) - arches=(\ - amd64 - 386) - _build_altbuild_archs "${arches[@]}" + _build_altbuild_archs "386" ;; Alt*ARM*Cross) - arches=(\ - arm - arm64) - _build_altbuild_archs "${arches[@]}" + _build_altbuild_archs "arm" ;; Alt*Other*Cross) arches=(\ @@ -432,59 +432,6 @@ _run_machine-linux() { showrun make localmachine |& logformatter } -# Optimization: will exit if the only PR diffs are under docs/ or tests/ -# with the exception of any given arguments. E.g., don't run e2e or unit -# or bud tests if the only PR changes are in test/system. -function _bail_if_test_can_be_skipped() { - local head base diffs - - # Cirrus sets these for PRs but not branches or cron. In cron and branches, - #we never want to skip. - for v in CIRRUS_CHANGE_IN_REPO CIRRUS_PR DEST_BRANCH; do - if [[ -z "${!v}" ]]; then - msg "[ _cannot do selective skip: \$$v is undefined ]" - return 0 - fi - done - # And if this one *is* defined, it means we're not in PR-land; don't skip. - if [[ -n "$CIRRUS_TAG" ]]; then - msg "[ _cannot do selective skip: \$CIRRUS_TAG is defined ]" - return 0 - fi - - # Defined by Cirrus-CI for all tasks - # shellcheck disable=SC2154 - head=$CIRRUS_CHANGE_IN_REPO - # shellcheck disable=SC2154 - base=$PR_BASE_SHA - echo "_bail_if_test_can_be_skipped: head=$head base=$base" - diffs=$(git diff --name-only $base $head) - - # If PR touches any files in an argument directory, we cannot skip - for subdir in "$@"; do - if grep -E -q "^$subdir/" <<<"$diffs"; then - return 0 - fi - done - - # PR does not touch any files under our input directories. Now see - # if the PR touches files outside of the following directories, by - # filtering these out from the diff results. - for subdir in docs test; do - # || true needed because we're running with set -e - diffs=$(grep -E -v "^$subdir/" <<<"$diffs" || true) - done - - # If we still have diffs, they indicate files outside of docs & test. - # It is not safe to skip. - if [[ -n "$diffs" ]]; then - return 0 - fi - - msg "SKIPPING: This is a doc- and/or test-only PR with no changes under $*" - exit 0 -} - # Nearly every task in .cirrus.yml makes use of this shell script # wrapped by /usr/bin/time to collect runtime statistics. Because the # --output option is used to log stats to a file, every child-process