diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-07-27 12:02:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 12:02:25 -0400 |
commit | 87f892e5b56c2fab2f394f8cc79794ccce03f510 (patch) | |
tree | 1ba831a9dddfb6927698bcb9e0c2bee913ad0dcb /contrib | |
parent | c57b5c9b831695f8c54d11b4f288d6037c096fea (diff) | |
parent | 983cfb90e68d7b292b0f6ee8800c3f23383493cc (diff) | |
download | podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.tar.gz podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.tar.bz2 podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.zip |
Merge pull request #15076 from mheon/bump_420_rc2
Bump to v4.2.0-RC2
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cirrus/CIModes.md | 2 | ||||
-rwxr-xr-x | contrib/cirrus/logformatter | 20 | ||||
-rwxr-xr-x | contrib/cirrus/runner.sh | 13 | ||||
-rwxr-xr-x | contrib/cirrus/setup_environment.sh | 23 | ||||
-rw-r--r-- | contrib/remote/containers.conf | 2 |
5 files changed, 43 insertions, 17 deletions
diff --git a/contrib/cirrus/CIModes.md b/contrib/cirrus/CIModes.md index 8b1e33bb1..c782ca64b 100644 --- a/contrib/cirrus/CIModes.md +++ b/contrib/cirrus/CIModes.md @@ -27,7 +27,7 @@ outdated) example of it's output can be seen below: [The list is documented](https://cirrus-ci.org/guide/writing-tasks/#environment-variables). Reference to any variables defined in YAML will **not** behave how you expect, don't use them! -* Somme Cirrus-CI defined variables contain non-empty values outside their +* Some Cirrus-CI defined variables contain non-empty values outside their obvious context. For example, when running for a PR a task will have `$CIRRUS_BRANCH` set to `pull/<number>`. diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 59969c3e7..1dc618768 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -560,18 +560,14 @@ END_HTML # See #14569 for more info. # # [1] https://cirrus-ci.org/guide/writing-tasks/#latest-build-artifacts - if ($have_formatted_log && $ENV{CIRRUS_BUILD_ID} && $ENV{CIRRUS_TASK_NAME}) { - my $URL_BASE = "https://api.cirrus-ci.com"; - my $build_id = $ENV{CIRRUS_BUILD_ID}; - my $task_name = $ENV{CIRRUS_TASK_NAME}; - - # Escape spaces in task names ("int fedora 35 podman root etc") - $task_name =~ s/\s/%20/g; - - # URL is long and cumbersome and duplicaty. The task name cannot be - # reduced; the file name could, but I choose to leave it because I - # sometimes download HTML logs and oh how I hate "log.html" filenames. - my $URL = "${URL_BASE}/v1/artifact/build/$build_id/$task_name/html/${outfile}"; + if ($have_formatted_log && $ENV{CIRRUS_TASK_ID}) { + my $URL_BASE = "https://api.cirrus-ci.com"; + my $task_id = $ENV{CIRRUS_TASK_ID}; + + # Link by *taskID*, not buildID + taskname. First, this is shorter + # and less duplicaty. Second, and more important, buildID + taskname + # is non-unique, and a link to a flake log will be clobbered. + my $URL = "${URL_BASE}/v1/artifact/task/$task_id/html/${outfile}"; print "\n\nAnnotated results:\n $URL\n"; } diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 762a3b501..939cc33ce 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -236,6 +236,16 @@ function _run_build() { make clean make vendor make podman-release # includes podman, podman-remote, and docs + + # Last-minute confirmation that we're testing the desired runtime. + # This Can't Possibly Failâ„¢ in regular CI; only when updating VMs. + # $CI_DESIRED_RUNTIME must be defined in .cirrus.yml. + req_env_vars CI_DESIRED_RUNTIME + runtime=$(bin/podman info --format '{{.Host.OCIRuntime.Name}}') + # shellcheck disable=SC2154 + if [[ "$runtime" != "$CI_DESIRED_RUNTIME" ]]; then + die "Built podman is using '$runtime'; this CI environment requires $CI_DESIRED_RUNTIME" + fi } function _run_altbuild() { @@ -324,6 +334,9 @@ function _run_release() { } +# ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING*** +# Please see gitlab comment in setup_environment.sh +# ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING*** function _run_gitlab() { rootless_uid=$(id -u) systemctl enable --now --user podman.socket diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 4952f8dd2..d5044816d 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -321,13 +321,30 @@ case "$TEST_FLAVOR" in install_test_configs ;; gitlab) - # This only runs on Ubuntu for now + # ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING*** + # This sets up a special ubuntu environment exclusively for + # running the upstream gitlab-runner unit tests through + # podman as a drop-in replacement for the Docker daemon. + # Test and setup information can be found here: + # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27270#note_499585550 + # + # Unless you know what you're doing, and/or are in contact + # with the upstream gitlab-runner developers/community, + # please don't make changes willy-nilly to this setup. + # It's designed to follow upstream gitlab-runner development + # and alert us if any podman change breaks their foundation. + # + # That said, if this task does break in strange ways or requires + # updates you're unsure of. Please consult with the upstream + # community through an issue near the one linked above. If + # an extended period of breakage is expected, please un-comment + # the related `allow_failures: $CI == $CI` line in `.cirrus.yml`. + # ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING*** + if [[ "$OS_RELEASE_ID" != "ubuntu" ]]; then die "This test only runs on Ubuntu due to sheer laziness" fi - # Ref: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27270#note_499585550 - remove_packaged_podman_files make install PREFIX=/usr ETCDIR=/etc diff --git a/contrib/remote/containers.conf b/contrib/remote/containers.conf index 9b0b62c42..70710be04 100644 --- a/contrib/remote/containers.conf +++ b/contrib/remote/containers.conf @@ -1,4 +1,4 @@ -# The containers configuration file specifies all of the available configuration +# The container's configuration file specifies all of the available configuration # command-line options/flags for container engine tools like Podman # but in a TOML format that can be easily modified and versioned. |