Commit graph

348 commits

Author SHA1 Message Date
Chris Evich f76fa3475d
Cirrus: Add gitlab podman runner test
Add execution of the downstream gitlab-runner tests using
rootless podman through the magic of socket-level
docker compatibility.  Include a comment suggesting how
to temporarily disable the test in case it fails beyond
podman code scope.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-27 10:37:31 -04:00
Chris Evich 319fcf52fc
Cross-build release-archives w/ arch in filename
Fixes #11417

Cross-building the podman-remote documentation requires a functional
native architecture executable.  However `make` only deals with
files/timestamps, it doesn't understand if an existing binary will
function on the system or not.  This makes building cross-platform
releases incredibly accident-prone and fragile.

A practical way to deal with this, is via multiple conditional (nested)
`make` calls along with careful manipulation of `$GOOS` and `$GOARCH`.
Also, when cross-building releases be kind to humans and cleanup
any non-native binaries left behind.

Update the `Alt Arch. Cross` Cirrus-CI task to build release archives
for all Linux architectures supported by golang and podman.  Update
the `OSX Cross` task to additionally build for the M1 (arm64)
architecture.

Finally, update the release process documentation to reflect the
new locations (Cirrus-CI task names) for the release archives.  Include
a note about additional manual work being required to produce the
signed `.dmg` file for MacOS.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-21 14:34:30 -04:00
Chris Evich d30facfda8
Cirrus: NM/CNI workaround + Remove prior-Ubuntu
Ref: https://github.com/containers/automation_images/pull/88

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-13 15:52:31 -04:00
Chris Evich 5fdd0431b7
Cirrus: Run unit-tests rootless
Previously (for various reasons) the unittests were limited by the
Makefile to root-only.  However, experimentation via PR #11490
shows they will actually execute and pass when run as a regular user.
Enable this for only the latest Fedora VMs, so as to only add one new
task to the (already large) set.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-09 14:07:19 -04:00
Chris Evich 1ed0a7209d
Cirrus: Reduce APIv2 task timeout
At the time of this commit, a significant problem has been identified
(introduced in f5ce02b227).  The effect is, `podman pull` has a chance
of hanging, especially when re-pulling an existing image.  While a fix
is in the works, there's no reason to make developers wait the full
(default) 1-hour timeout for the APIv2 task.  Reduce it to 2x nominal
test runtime, so if the hang/flake is hit, the task can be re-run more
quickly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-31 14:01:17 -04:00
OpenShift Merge Robot 7b75ddb70c
Merge pull request #11374 from cevich/no_api2_cidocs
Cirrus: Skip APIv2 tests for [CI:DOCS]
2021-08-31 10:59:25 -04:00
Chris Evich b3aee22bdc
Cirrus: Skip APIv2 tests for [CI:DOCS]
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-31 09:36:48 -04:00
Ed Santiago 1122c66ce8 upgrade test: add new baseline
Add a new reference point against which to test upgrades.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-08-30 14:27:48 -06:00
Chris Evich 14f3658dad
Revert ".cirrus.yml: use fresh images for all VMs"
This reverts commit 404d5edb15.

The replacement (updated) images include a fix for:
https://github.com/containers/common/issues/631

Also minor update to an unrelated FIXME comment.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-18 12:04:04 -04:00
Chris Evich bfc9362614
Cirrus: Resolve two upgrade-test FIXMEs
I attempted to run the tests in a loop (one VM) but it fails with:

```
not ok 8 exec
 (from function `is' in file test/upgrade/../system/helpers.bash, line
474,
   in test file test/upgrade/test-upgrade.bats, line 222)
    `is "$output" "$RANDOM_STRING_1" "exec into myrunningcontainer"'
failed
   /var/tmp/go/src/github.com/containers/podman/bin/podman exec
myrunningcontainer cat /var/www/index.txt
  time="2021-08-17T13:34:21-05:00" level=warning msg="Failed to add
conmon to systemd sandbox cgroup: Invalid unit name '/libpod_parent'"
  uagHtpYnA47bkz3
   /vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
   |     FAIL: exec into myrunningcontainer
   | expected: 'uagHtpYnA47bkz3'
   |   actual: 'time="2021-08-17T13:34:21-05:00" level=warning
msg="Failed to add conmon to systemd sandbox cgroup: Invalid unit name
'/libpod_parent'"'
   |         > 'uagHtpYnA47bkz3'
   \^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

Since the current implementation doesn't reproduce this error, the
change isn't worth the cost of debugging/fixing.  OTOH, making the job
only run from the daily cirrus-cron builds is a simple change.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-17 15:05:29 -04:00
Chris Evich 27443660ce
Enable docker-py compat. testing w/ ignored result
Significant bitrot results in almost immediate test failure.  This
commit adds only the very basic, bare-minimum needed to get them
started.

***TESTING RESULTS ARE IGNORED***

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-09 17:32:55 -04:00
Chris Evich f4dd22b311
Cirrus: Fix not uploading logformatter html
Previously we were generating the annotated results but never uploading
them.  Fix this so visiting the advertised URL actually works.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-04 15:01:57 -04:00
Ed Santiago ec9dad7e4f buildah bud tests under podman-remote
New functionality -- mostly in the diffs we apply to
buildah's helpers.bash -- to enable running buildah-bud
tests under podman-remote. The gist of it is, we start
a 'podman system service' before each test, and clean
it up on test exit.

Design decision: the diff file for helpers.bash is no
longer trailing-whitespace-clean: that ended up producing
diffs that git wouldn't apply, because in some cases
the whitespace is actually important. In order to pass CI,
we need to exclude this file from some checks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-28 14:14:42 -06:00
Chris Evich 40ef17ac28
Cirrus: Fixes due to master->main rename
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-06-30 11:39:19 -04:00
Chris Evich 705b799afc
Cirrus: Prevent BZ1965743 workaround pruning
A hidden non-obvious corner-case of temporary changes introduced by
https://github.com/containers/podman/pull/10451 could be unintended
pruning of some ubuntu images.  This could be impactful if for some
reason the `.cirrus.yml: use c5521575421149184 for Ubuntu` commit is
reverted beyond 30-days (the disused image-prune interval) and the _old_
images are needed (for an unforeseen reason).

Mitigate this by temporarily including the old images in the timestamp
updating task. This commit may be reverted (and the problem ignored)
if new VM images are built and deployed for all OS's (i.e. replacing
the Fedora/Ubuntu tag split workaround needed for the BZ).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-06-16 15:19:53 -04:00
Giuseppe Scrivano 404d5edb15
.cirrus.yml: use c5521575421149184 for Ubuntu
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-06-16 10:16:04 +02:00
Chris Evich ae72aedf40
Use updated VM images + updated automation tooling
Both the `containers/automation` and `containers/automation_images` have
been updated with a default 'main' branch, renamed from 'master`.  These
images include adjusted tooling in addition to a refresh of all
packages.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-05-14 14:05:27 -04:00
Ed Santiago 95a50a936a CI: run rootless tests under ubuntu
Reason: to catch errors before they surface in RHEL.

One of the Ubuntus is specially crafted to run with cgroups v1
and runc. Although this isn't quite the same as RHEL, it's as
close as we can come in our CI environment, and I suspect it
would have caught #10234 (a regression).

Sorry, team.

Also: play kube limits test: skip on all rootless, not just
rootless+fedora. There was a complicated and unnecessary
check in there for Fedora.

Also: workaround for bug #10248, a spurious error message on
the first invocation of rootless podman on Ubuntu.Old

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-05-06 08:40:11 -06:00
Chris Evich 2eacf3e139
Cirrus: Update F34beta -> F34
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-29 11:34:08 -04:00
Chris Evich 0a08216990
Cirrus: Update Ubuntu images to 21.04
Also simplify `lib.sh` after supporting changes incorporated
into automation library 2.x+ (present in all VM and container images).

* No need to force-load `/etc/profile` and handle it's expectation
  to **not** being in `errexit` mode.
* Slightly re-arrange loading of automation library files for
  clarity.
* Update comments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-27 10:28:09 -04:00
Chris Evich b6b0b6e8bd
Overhaul Makefile binary and release worflows
* Incorporate changes from abandoned #9918: Use dedicated `bin`
  sub-directories for `windows` and `darwin` when building
  `podman-remote`.  The linux flavor remains under `bin` as before.

* Fix MacOS Documentation-generation for release-packaging.
  The `install-podman-remote-%-docs` target requires local execution
  of `podman-remote`, but it was assuming GOOS=linux.  Fix this
  by dynamically discovering the local OS/architecture type while
  still permitting cross-building of MacOS binaries under Linux.

* Unify temporary directory/file behavior to use a common template.
  In case of left-over temporary items left in the repository,
  update the `clean` target accordingly to remove them.

* Fix broken podman-remote-static and MacOS release archive targets
  mismatching the `podman-remote-%` target.  Disambiguate this target
  for all platforms by spelling each out in full, instead of using
  a wild-card recipe.

* Fix Windows-installer target to properly recognize existing
  output files and not constantly rebuild every time.

* Include the podman version number in the Windows-installer target
  in case a user downloads multiple releases.

* Include a subdirectory containing the podman version number for
  both `tar.gz` and `zip` targets.  This prevents users clobbering
  existing directories when un-archiving from releases.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-12 10:21:28 -04:00
Chris Evich ec88445fc8
Cirrus: Use Fedora 34beta images
Also, revert 4875a8fb

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-07 15:20:06 -04:00
baude d8babd4cb6 use updated ubuntu images
trying upstream golang on ubuntu to see if we can get a performance
benefit.

Signed-off-by: baude <bbaude@redhat.com>
2021-04-07 09:39:00 -05:00
Chris Evich 804da7ca07
Cirrus: Make use of shared get_ci_vm container
Depends on:
    https://github.com/containers/automation_images/pull/57
    https://github.com/containers/automation/pull/64
    https://github.com/containers/automation/pull/66
    https://github.com/containers/automation/pull/67
    https://github.com/containers/automation/pull/68

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-05 15:38:04 -04:00
Paul Holzinger d1e32dc6c6 Add rootless docker-compose test to the CI
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-01 17:27:03 +02:00
Ed Santiago 3baa9da4ed WIP: run buildah bud tests using podman
Set of scripts to run buildah's bud.bats test using
podman build in podman CI.

podman build is not 100% compatible with buildah bud.
In particular:

  * podman defaults to --layers=true; buildah to false
  * podman defaults to --force-rm=true; buildah to false
  * podman error exit status is 125; buildah is 2
  * differences in error messages, command-line arguments

Some of the above can be dealt with programmatically,
by tweaking the buildah helpers.bash (BATS helpers).
Some need to be tweaked by patching bud.bats itself.
This PR includes a patch that will, I fear, need to
be periodically maintained over time.

There will likely be failures when vendoring in a
new buildah, possibly because new tests were added
for new features that don't exist in podman, possibly
(I hope unlikely) if existing tests are changed in
ways that make the patch file fail to apply. I've
tried to write good instructions and to write the run
script in such a way that it will offer helpful hints
on failure. My instructions and code will be imperfect;
I hope they will be good enough to merit continued use
of this test (possibly with improvements to the instructions
as we learn more about real-world failures).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-21 06:59:01 -06:00
Daniel J Walsh af3499db5a
Latest crun/runc should handle blkio-weight test
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-17 16:39:39 +01:00
OpenShift Merge Robot 397aae32b9
Merge pull request #8749 from edsantiago/upgrade_test
podman upgrade tests
2021-02-26 13:19:25 +01:00
Ed Santiago 79eaadd3fb podman upgrade tests
Initial validation of using podman-in-podman to create an
old-podman root, then use new-podman to play with the
containers created therein.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-23 06:58:54 -07:00
Chris Evich 4875a8fb4c
Cirrus: Temp. disable prior-fedora (F32) testing
In anticipation of F34beta support, preemptively disable testing on
"prior-Fedora".  This will allow development to move forward without
a soon-to-be-EOL distro. holding anything back.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-02-22 14:12:37 -05:00
Chris Evich 6a6e868290
Cirrus: Collect ginkgo node logs artifacts
In rare cases, it's possible for one of the ginkgo processes to "hang".
When this occurs, the main output will contain this message:

``Ginkgo timed out waiting for all parallel nodes to report``

The only way to debug this was to look through concatenated printing
of the ginkgo node logs.  This is a tedious and daunting task,
requiring special search knowledge, facing a "wall of text".

Simplify the situation by collecting the node logs separately, as
individual files in a cirrus-artifact.  In this way, it's faster to
figure out which test "hung" by examining each log individually.  The
log file which does not have a pass/fail summary at the end,
indicates the last test hung (for whatever reason), and includes it's
output (if any).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-02-03 10:44:41 -05:00
OpenShift Merge Robot 735b16e347
Merge pull request #9063 from cevich/master_fix_validate
Cirrus: Fix running Validate task on branches
2021-01-30 06:26:58 -05:00
Chris Evich 8d979e093e
Cirrus: Build static podman-remote
Prior to this commit, the "Static Build" task only produced a
`bin/podman`.  Update this to also include a `bin/podman-remote`
binary.

Update the pr-should-include-tests checker to ignore the `nix`
directory, which isn't applicable.

Lastly, restore the static build task to 'required' for CI success.
Leaving the comment inplace in case it needs to be bypassed in the
future on short notice.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-28 13:58:11 -05:00
OpenShift Merge Robot 9d59daa7cc
Merge pull request #9082 from saschagrunert/static-build
Fix static build cache by using cachix
2021-01-27 15:18:22 -05:00
Chris Evich bfc1b66be1
Cirrus: Fix running Validate task on branches
Followup to dbb9943

Despite skipping the `Smoke` check, it was observed on a *new* branch,
the `validate` task (specifically `git-validation`) will fail.  This
is because:

* `$CIRRUS_LAST_GREEN_CHANGE` will be empty on a new branch.
* `$CIRRUS_BASE_SHA` is always empty for runs triggered by branch-push
* `$EPOCH_TEST_COMMIT` will be set to `YOU_FOUND_A_BUG`.

Fix this by eliminating the `Smoke` task entirely, simplifying all
the `make validate` operations into the `validate` cirrus task.  Ensure
this task does not run when a new branch or tag is pushed.

Also, eliminate the `$CIRRUS_BUILD_ID` value as it's confusing and not
actually used anywhere.  It was formerly used for building VM images,
but this has moved to another repo entirely.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-27 10:35:27 -05:00
Sascha Grunert f8bf509d16
Fix static build cache by using cachix
It looks like we always hit the caching issue in Cirrus CI described
within #8313. A solution around that is to use cachix, which has been
pre-populated from my local machine.

To push all (runtime and build) dependencies, we can leverage a
pre-populated store by:

```
> nix-store -qR --include-outputs $(nix-instantiate nix/default.nix) | cachix push podman
```

The cache can be re-used by everybody to rapidly build static Podman
binaries: https://app.cachix.org/cache/podman

[NO TESTS NEEDED]

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-01-27 16:15:23 +01:00
OpenShift Merge Robot 41dd1eb8a2
Merge pull request #9022 from cevich/swagger_upload
Cirrus: Upload swagger YAML in every context
2021-01-26 16:53:57 +01:00
Chris Evich 4e4d318b71
Cirrus: Upload swagger YAML in every context
The podman documentation site uses javascript to display
API documentation at:

http://docs.podman.io/en/latest/Reference.html

As input, the javascript sources from a CORS-enabled Google Cloud
Storage object.  This commit ensures the storage object is present and
updated for every Cirrus-CI execution context: Tags, Branches, and PRs.

As of this commit, the documentation site only utilizes the object
uploaded by the Cirrus-CI run on the `master` branch:
`swagger-master.yaml`.  The file produced and uploaded due to a PR is
intended for testing purposes: Confirm it's generation and uploading are
both functional.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-21 10:26:57 -05:00
Chris Evich dbb99433d5
[CI:DOCS] Cirrus: Skip smoke task on branch-push
There is no need to re-run the same basic validation checks as were
presumably already run on a PR before it merged.  There are also
possible problems properly determining `$EPOCH_TEST_COMMIT` when
there have been no successful CI-runs on the branch (i.e. it's new).
This needlessly fouls up the git-validation tool.  Fix Both problems
by just skipping the 'smoke' task for branches and tags.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-21 09:09:23 -05:00
Valentin Rothberg a3621a7cff Cirrus: add bindings checks
Make sure that bindings are in sync with the code.  The check is similar
to what's already being done with `make vendor`, so integrate the two.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-20 14:38:02 +01:00
baude 683bab03f8 [CI:DOCS]Do not run compose tests with CI:DOCS
Signed-off-by: baude <bbaude@redhat.com>
2021-01-18 10:20:43 -06:00
Chris Evich 1231665e54
Cirrus: Utilize $GOPATH cache for alt_build task
Specifically, the result of 'make install.tools' is needed.  Part of
that target installs tooling into `$GOPATH/bin`.  A future commit
requires this tooling for the `Build Each Commit` item of the
alt_build matrix.  Re-use the cache of this directory for this
task to ensure the necessary tooling/libraries are available.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-13 15:34:58 -05:00
OpenShift Merge Robot b5c8cee932
Merge pull request #8900 from cevich/no_tag_testing
Cirrus: Skip most tests on tag-push
2021-01-12 13:38:59 -05:00
Chris Evich 1d8b9e944f
Cirrus: Add cross-compile test for alternative arches
Followup to https://github.com/containers/podman/pull/8907 that simply
ensures cross-compiling podman completes.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-11 13:46:37 -05:00
Chris Evich 201d853283
Cirrus: Skip most tests on tag-push
Due to various reasons, CI results (esp. testing tasks) are completely
ignored for builds triggered by a new tag-push.  Additionally, since
many of the automation scripts are in the repo., any related
failures/flakes would require code changes (therefore a new tag).

Resolve this by skipping every testing-type task for builds triggered by
tag-push.  Only retain tasks which build things intended for consumption
associated with a possible official release.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-07 11:26:34 -05:00
Chris Evich e467400eb1
Cirrus: Update Fedora & Ubuntu images
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-06 10:08:48 -05:00
Chris Evich e3ba7092fb
Cirrus: Add support for Ubuntu 20.x
Previously automation always dropped the minor version number for
distributions.  This was intended for presentation and conditional
simplicity. Bash does not support non-integer comparison natively.

With the release of version 20.10, supporting testing with it and
the LTS release (20.04) requires scripts to consider minor version
numbers for Ubuntu VMs.  This is necessary because many times in
the past, some behaviors needed to be conditional on the release
version number.

With this commit, the images and embedded scripts/tooling uses an
altered format of `$UBUNTU_NAME', `$PRIOR_UBUNTU_NAME`, and (crucially)
`$OS_RELEASE_VER` and `$OS_REL_VER`.  Any `.` characters appearing
in the official version (from `/etc/os-release`) are dropped, and
the result is concatenated.

For example the current Ubuntu LTS version is `20.04`.  Prior to
this commit, `$OS_RELEASE_VER` would have been `20`.  With this
change, `$OS_RELEASE_VER` will now show `2004`.  Similarly `20.10`
is shown as `2010`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-12-15 18:49:09 -05:00
baude 82d7b9f2e2 add compose regression to ci
to prevent any regressions, we should be running regression tests using
compose.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-11 09:26:29 -06:00
Daniel J Walsh f62a356515
Remove varlink support from Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 16:50:42 -05:00
Chris Evich b8d25bd2cd
Cirrus: Invalidate static cache on VM image update
It's important to periodically update the nix cache (about 1GB in size).
If not, it can grow stale and has been observed causing task failures.
Associating the nix cache update with a VM/Container image update,
ensures it happens first in PRs where environment-related failures
are less surprising.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-11-16 15:23:08 -05:00