Commit Graph

1106 Commits

Author SHA1 Message Date
Ed Santiago 86e55d0ec1 system tests: prevent leading tabs
Replace existing tab indentations with spaces, and add
a test to CI to prevent new ones from sneaking in.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-15 13:50:17 -07:00
Erik Sjölund a5ca732256 Fix typos
Software version used
https://github.com/crate-ci/typos/releases/tag/v1.13.10

The binary was downloaded from
https://github.com/crate-ci/typos/releases/download/v1.13.10/typos-v1.13.10-x86_64-unknown-linux-musl.tar.gz

Command that was run:

typos --write-changes docs cmd cni contrib dependencies docs hack libpod pkg utils

False positives were manually removed.
A few marshaling/existant typos were manually fixed.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-02-11 18:23:24 +01:00
Chris Evich 45fb353f46
Cirrus: Make benchmarks .env file easier to load
The `benchmarks.env` file is intended for machine consumption.
Including things like a `kB` unit label (like `$MEMTOTAL`) make items
difficult to parse.  Additionally, multi-value keys (like `$UNAME_RM`)
make extra/unnecessary work for the interpreter.  Simplify these items
and include a data-schema version marker so an interpreter can be made
aware/support future format changes.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-10 13:57:53 -05:00
Chris Evich a7db3e8d2c
Cirrus: Omit functions in env. file
The `localbenchmarks()` function stores a `.env` file containing current
environment variables for benchmark-classification purposes.  However its
naked use of `printenv` means it was logging the contents of library
functions and (worse) trying to stort all the lines.  This results in an
unusable mess inside `benchmarks.env`.  Fix this by re-using the
purpose-built passthrough_envars() which is designed to only print
useful, safe, env. vars.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-10 12:07:13 -05:00
Daniel J Walsh 5865159766
Run codespell on codebase
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-09 08:02:43 -05:00
Chris Evich 50f72fe7b1
[CI:BUILD] Cirrus: Fix GraphQL ownerRepository:null error
A semantic change to a Cirrus-CI GraphQL API parameter caused a
unit-test to fail (as it should have) with the error:

```
Query result did not pass filter '.data.ownerRepository.cronSettings':
'{"data":{"ownerRepository":null}}'
```

As per Cirrus-support, a change was introduced in schema affecting certain
fields that were incorrectly marked Nullable.  They indicated the `platform`
field was set incorrectly, and should use the value `github`.

* Fix the platform field's value to `github` instead of `LINUX`.
* Change the unit-test to only execute as part of the 'main' cirrus-cron
  job so it cannot impact PRs.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-06 15:57:51 -05:00
Chris Evich 84c674fee0
Revert "Cirrus: Emergency fix to un-stuck PRs"
This reverts commit 6b3073f53e.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-06 13:45:04 -05:00
Chris Evich 6b3073f53e
Cirrus: Emergency fix to un-stuck PRs
All PRs are broken because this test fails, presumably due to a GraphQL
API change.  Disable the test temporarily until a permanent solution
can be found.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-06 10:52:33 -05:00
Chris Evich cf7afed055
Cirrus: Use versionable IMAGE_SUFFIX
Image content hasn't changed much, the biggest thing here is the
$IMAGE_SUFFIX value. This new schema is also fully manageable by
renovate. Allowing a tag-push to c/automation_images to create image
update PRs in all repos automatically.

ref: https://github.com/containers/automation_images/pull/247

Also, cleanup a few comments and remove a disused testing task.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-01 11:34:18 -05:00
Arthur Sengileyev 387f0ea2f6 Making gvproxy.exe optional for building Windows installer
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-01-29 22:04:53 +02:00
Arthur Sengileyev 74c0909736 Add gvproxy to Windows packages
Updated build scripts and installer build scripts to include gvproxy.exe.
Includes tutorial on setting up a Podman VM with QEMU and gvproxy on Windows.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2023-01-29 22:01:00 +02:00
OpenShift Merge Robot 986a3a61a8
Merge pull request #17182 from TomSweeneyRedHat/dev/tsweeney/fixlang3
Clean up more language for inclusiveness
2023-01-27 15:50:35 -05:00
tomsweeneyredhat 9db657f40c Clean up more language for inclusiveness
We had a number of references, mostly in docs, to the word master that
can now be changed to main.  This PR does that and makes the project a
bit more inclusive.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-27 09:40:27 -05:00
Lokesh Mandvekar 0ffce81810
Bump cirrus image with easier dependency management
- for cni tests remove netavark and aardvark only if installed
- install ginkgo in envs wherever needed

Related:
https://github.com/containers/automation_images/pull/177
https://github.com/containers/automation_images/issues/159
https://github.com/containers/automation_images/issues/161

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Update .cirrus.yml

Co-authored-by: Chris Evich <1183438+cevich@users.noreply.github.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-01-26 18:40:14 +05:30
OpenShift Merge Robot 7689e26c79
Merge pull request #16525 from Luap99/CI-update-image
update CI images to include pasta
2023-01-19 11:30:46 -05:00
Paul Holzinger 3db8ef37d8
add testbindings Makefile target
use this target in the CI script to make sure it uses the correct gingko

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
Paul Holzinger 5ad72a2349
update CI images to include pasta
Images were build here: https://github.com/containers/automation_images/pull/249

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:43:40 +01:00
Ed Santiago 07d297ca3d Cirrus: preserve podman-server logs
Output from podman system service, on system tests, is
being saved... it just hasn't been collected as an artifact.
Start collecting it. And, remove obsolete-unused-misleading
code that made me think it _was_ being collected.

Also: log system-service output for bud tests, and set
log-level to info per suggestion from @Luap99

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-19 06:27:43 -07:00
Daniel J Walsh 7147618c94
Merge pull request #17161 from sbidoul/add-openssh-client
Add openssh-clients to podmanimage
2023-01-18 17:51:13 -05:00
Stéphane Bidoul 36510f60db Add openssh-clients to podmanimage
The main goal is to provide ssh-agent,
which is required by podman build --ssh.

Signed-off-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
2023-01-18 20:07:02 +01:00
Jason T. Greene 0bd51f6c87 Reworks Windows smoke test to tunnel through interactive session.
The latest Windows image from containers/automation_image@327d8799 auto-creates
an interactive session through winlogon autologon on boot. Additionally it
includes the PsTools psexec command on the system.

This change utilizes both aspects to launch the verification portion of the
smoke task under the interactive session, away from the session 0 execution
environment that the Cirrus agent runs in.

Since creating a new process under the interactive session requires a new token,
and by extension a clear text password, a new crypto random password is
generated to replace the ec2 boot generated one.

These changes allow WSL to once again function after its move to a store based
delivery stream (which is incompatible with session 0 execution).

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-18 11:23:43 -06:00
Chris Evich 11835d5d0c
Cirrus: Support using updated/latest NV/AV in PRs
On occasion, developers need to run the latest or bleeding-edge
netavark/aardvark-dns in the podman CI environment.  Enable this through
use of magic strings in the PR title, but only if the PR is marked as a
draft.  The intent being, when the PR is ready for review, the current
CI VM package versions will be used.  Hopefully also reminding the PR
author to remove the magic strings from the title, remove draft status,
and push the final set of changes to be merged.

Also, add documentation about this new magic PR title string and CI's
behaviors.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-01-12 17:30:24 -05:00
Jason T. Greene 2bf94b764a Introduce pkg retry logic in win installer task
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-10 16:57:52 -06:00
OpenShift Merge Robot 9f9666ea1d
Merge pull request #17056 from edsantiago/logformatter_base_sha
logformatter: include base SHA, with history link
2023-01-10 13:03:57 -05:00
Ed Santiago db03236391 logformatter: include base SHA, with history link
This is to help me in my flake analysis.

Scenario: I'm looking at recent flakes, and see Flake X. I know
that Flake X was "fixed" two weeks ago. Did the fix not work?
Or is this just one of those PRs that was created three weeks
ago (or three months ago) and never rebased to pick up the fix?
This adds a one-click way for me to tell.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-10 06:41:27 -07:00
Jason T. Greene 28f13a74bc Update Mac installer to use gvproxy v0.5.0
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-09 15:07:59 -06:00
OpenShift Merge Robot 31e22aade6
Merge pull request #16997 from n1hility/winstaller-arm-compat
Fixes automated WSL installation on ARM
2023-01-09 09:56:04 -05:00
Ed Santiago a7f53932a7 logformatter: nicer formatting for bats failures
add a new failblock style, with light red background all across
the entire page, and use it for bats "FAIL" blocks.

Also highlight logrus level=(debug|info|warning|error|fatal)
messages in increasingly prominent styles

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-06 08:26:37 -07:00
Ed Santiago ee3380e6b1 logformatter: refactor verbose line-print
Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-06 08:26:37 -07:00
Jason T. Greene 54afda22bf Switch to C based msi hooks for win installer
Fixes automated WSL installation on ARM

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-05 01:49:49 -06:00
OpenShift Merge Robot 1c8b40d097
Merge pull request #16449 from cevich/localbenchmarks
Cirrus: Collect benchmarks on machine instances
2023-01-04 07:31:09 -05:00
OpenShift Merge Robot af805b3efe
Merge pull request #16565 from anjannath/docker-sock
pkginstaller: install podman-mac-helper by default
2022-12-21 11:08:07 -05:00
Alexander Larsson ddeb9592c9 Add podman-clean-transient.service service
This is a unit that can be enabled when using transient store mode
to clean up potential leftovers from previous boots. All it does is
run "podman system prune --external" once each boot.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-20 10:24:25 +01:00
Valentin Rothberg 12d0584006 podman-kube@ template: use `podman kube`
Use the new `podman kube {down,play}` commands.

[NO NEW TESTS NEEDED] as this is a purely cosmetic change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-12-16 13:16:06 +01:00
Chris Evich 7c6873b23d
Cirrus: Collect benchmarks on machine instances
The hardware used for podman-machine testing is fairly
stable/predictable because it's bare-metal.  This is a nearly ideal
environment for collection of benchmarking data.  Arrange for that to
happen, and the resulting data to be collected.

Also keep track of the benchmark-basis details in a machine-readable
`env` file along side the raw and parsed benchmarks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-12-09 11:16:28 -05:00
Chris Evich b361a42e65
Cirrus: Remove escape codes from log files
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-12-09 11:15:19 -05:00
Doug Rabson eaab4b99a4 Add a FreeBSD cross build to the cirrus alt build task
This just verifies that a non-cgo podman binary can build for FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-12-03 13:58:19 +00:00
OpenShift Merge Robot ca6ae5ca98
Merge pull request #16678 from edsantiago/simplify_passthrough_env
CI setup: simplify environment passthrough code
2022-12-03 07:26:34 -05:00
OpenShift Merge Robot 3f80a68fd3
Merge pull request #16667 from cfergeau/artifacts
Make released binary names more consistent
2022-12-03 07:20:08 -05:00
Ed Santiago bdd5f82458 CI setup: simplify environment passthrough code
The passthrough_env function was unnecessarily complicated,
hence fragile. Clean it up, and add regression tests.

For future reference: CI broke horribly because of this.
Rootless tests all failed with missing CI_DESIRED_NETWORK.
Root cause was that CIRRUS_CHANGE_TITLE had a trailing
space which, because of shell indirection, passthrough_env()
wrote as trailing backslash (not backslash-space) in the
/etc/ci_environment file, which then caused the next line
in the file to get glommed onto CIRRUS_CHANGE_TITLE.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-12-01 16:19:22 -07:00
Christophe Fergeau 54ef7f98d9 macos: pkg: Use -arm64 suffix instead of -aarch64
All files released in
https://github.com/containers/podman/releases/tag/v4.3.1 use -arm64 for
the arch name except podman-installer-macos-aarch64.pkg

Related: https://github.com/containers/podman/issues/16612
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2022-11-29 11:18:21 +01:00
Christophe Fergeau fe548dd0b0 linux: Add -linux suffix to podman-remote-static binaries
This is more consistent with the name of the other released files, and
makes identification of the binaries easier among the Windows/macOS
ones.

Related: https://github.com/containers/podman/issues/16612
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2022-11-29 11:18:20 +01:00
Christophe Fergeau d223950078 linux: Build amd64 and arm64 podman-remote-static binaries
Looking at https://github.com/containers/podman/releases/tag/v4.3.1,
it's not explicit which arch the podman-remote-static binary is built
for, so this commit adds an -$(goarch) suffix to it. It builds both
arm64 and amd64 binaries as I need both for crc.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2022-11-29 11:18:18 +01:00
Jason T. Greene d2ac99d65c Allow manual override of install location
Also reuse install location for previous installs if present

Example Usage: .\podman-4.3.2-setup.exe InstallFolder=C:\Other\Loc

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-11-28 15:46:35 -06:00
Anjan Nath 1498f924b2 pkginstaller: install podman-mac-helper by default
this runs the /opt/podman/bin/podman-mac-helper install
in the postinstall script

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-11-21 13:14:13 +05:30
Ed Santiago 34020b353a CI: Package versions: run in the 'main' step
...not as a separate post-main step. Reasons:

 1) If main test times out, Cirrus won't run subsequent steps
 2) It really belongs in the main log anyway, because when
    looking at test results, you want to have instant access
    to versions, you don't want to have to clickety-click
    ten steps.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-16 06:52:07 -07:00
Anjan Nath f0dba82bb3 pkginstaller: bump Qemu to version 7.1.0
this updates the Makefile qemu version to make use new qemu released at
https://github.com/containers/podman-machine-qemu/releases/tag/v7.1.0-1

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-11-14 11:59:06 +05:30
OpenShift Merge Robot 911dc94d23
Merge pull request #16478 from edsantiago/docs_version_check
[CI:DOCS] New tool, docs/version-check
2022-11-10 19:48:09 +00:00
OpenShift Merge Robot 4a4d35d5f4
Merge pull request #16414 from cevich/fix_cirrus_cron_jobs
[CI:BUILD] Fix cirrus cirrus-cron GHA workflow scripts, add checks, and tests
2022-11-10 17:16:38 +00:00
Ed Santiago db439dd23e New tool, docs/version-check
Intended to be run from nightly Cirrus cron job.

 1) Queries github for highest-sorting (not necessarily "latest") tag
 2) Checks that the Windows MSI exists, fails if not
 3) Cross-checks markdown files to ensure they have up-to-date links

When run interactively, it will auto-update the .md files
to show and link to the latest version. This makes it easy
for anyone to then submit an update PR.

And, it turns out that MSI is obsolete, the new thing is EXE.
Update the tutorials to reflect that.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-10 08:54:56 -07:00
Valentin Rothberg 4408072108 contrib/cirrus/check_go_changes.sh: ignore test/tools/vendor
To avoid false positives if dependencies get bumped in test/tools.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-11-10 10:39:27 +01:00
Chris Evich 0334d8d611
Cirrus: Add tests for GHA scripts
Also, fix the rerun_cirrus_cron workflow.  Thanks @ygalblum for spotting
the error.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:47:30 -05:00
Chris Evich d17b7d852a
Cirrus: Shellcheck github-action scripts
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:46:34 -05:00
Chris Evich 2ee40287e0
Cirrus: shellcheck support for github-action scripts
This should help catch some obvious gaffs and/or style/lint type
problems.  Maybe.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:46:34 -05:00
Daniel J Walsh efbad590d7
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-11-04 10:57:41 -04:00
Chris Evich f3195c930b
Cirrus: Never skip running Windows Cross task
All the other Windows tasks depend on access to a podman-remote build
from the Alt. Arch. `Windows Cross` task.  Re-arrange the test-skipping
call to never skip here only.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-03 16:17:24 -04:00
Ed Santiago d7e70c7489 CI: set and verify DESIRED_NETWORK (netavark, cni)
We have CI tests running in netavark mode when CNI is desired.
Add a new .cirrus.yml envariable, CI_DESIRED_NETWORK, which
we then force-check in e2e and system tests. Simple copy/paste
of #14912 (the RUNTIME check) with manual s/RUNTIME/NETWORK/
and other minor changes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-03 04:40:42 -06:00
Chris Evich 8530724555
Cirrus: Guarantee CNI testing w/o nv/av present
Comments added to code for clarity.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-02 13:42:06 -04:00
Chris Evich ecd1927b4c
Cirrus: Update to F37beta
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-02 13:38:28 -04:00
Jason T. Greene 884350d999 Add Windows Smoke Testing
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-11-02 00:52:09 -05:00
Ed Santiago f0f12658de Test runners: nuke podman from $PATH before tests
We've had some oopsies in system tests:

    podman foo bar
    run podman foo bar

...all of which should be run_podman with underscore. Those
have been passing because /usr/bin/podman is the fallback
from $PATH. In those (few) cases, we haven't actually been
testing the podman we should be testing.

Solution: nuke /usr/bin/podman and podman-remote before
invoking system and unit tests. As an extra level of
paranoia, check for other podmans in $PATH - if any
exist, bail out with a fatal error.

Also: in a few cases where runner.sh invokes podman for
containerized something-something, run bin/podman instead
of podman from $PATH.

Also: fix existing dependencies on /usr/bin/podman

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-26 19:07:20 -06:00
Ed Santiago 4966f509bd logcollector: include aardvark-dns
(minor correction to package name)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-24 06:16:33 -06:00
Urvashi Mohnani 30e66d6003 Set up minikube for k8s testing
Install and set up minikube so that we can
create a k8s cluster for testing.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-10-18 10:51:27 -04:00
Joakim Nohlgård 02bb7c2cf3 Podman image: Set default_sysctls to empty for rootless containers
Avoids the error "Error: error preparing container xyz... for attach:
crun: open /proc/sys/net/ipv4/ping_group_range: Read-only file system:
OCI runtime error" when using `podman run --net bridge` inside rootful
Podman running without --security-opt unmask=ALL (or 'unmask=/proc/*')

Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
2022-10-18 09:27:20 +02:00
Chris Evich bb2b47dc70
Add swagger install + allow version updates in CI
Support swagger testing and optional runtime updates similar to
the current golangci-lint tool.  This allows developers to update the
version of swagger at runtime if needed.  Otherwise new CI VM images
will pick up the prescribed version at image build-time via
`make install.tools`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-10-14 08:18:52 -04:00
Chris Evich 62bc8e3a18
Cirrus: Fix tag & branch go checks failing
When running on a branch or tag, `req_env_vars()` will call `exit(1)`
because `$CIRRUS_PR` is empty (as expected).  The original intention was
to simply skip language checks on non-PRs.  Fix the condition to match.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-10-03 12:23:46 -04:00
OpenShift Merge Robot 226977fafb
Merge pull request #16001 from cevich/image_readme
[CI:DOCS] Add quay-description update reminder
2022-09-30 15:28:15 +02:00
Chris Evich 66747351f0
[CI:DOCS] Add quay-description update reminder
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-29 14:32:01 -04:00
Chris Evich 0660f5b7a4
Cirrus: Combine build and code consistency tasks
It's conceivable for CI to spend a lot of time testing code which
otherwise should be rejected due to quality problems.  Previously this
was validated in a dedicated task, however a failure would still fail
the CI run.  Simplify the number of CI tasks by combining the consistency
check at the tail-end of the build task.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-29 13:06:01 -04:00
Chris Evich 6c8a11b746
Cirrus: Combine pre-test checks into build task
Previously, two tasks always ran first, prior to anything else.  One to
verify network and external-service connectivity.  Another to verify
certain important `.cirrus.yml` standards are met.  However, as the
total number of tasks continues to grow, the need to keep these basic
checks as dedicated prerequisites is of decreasing value/importance.
Fold these two checks into a new `pretesting_script` component of the
Fedora `build` task, on both `x86_64` and `aarch64`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-29 12:59:48 -04:00
OpenShift Merge Robot b7eee0b2ce
Merge pull request #15917 from cevich/check_new_go_code
[CI:BUILD] Check new go code
2022-09-29 01:12:03 +02:00
Ed Santiago 0fb95f95d2 CI: only make install.tools when needed
Reintroduce .install.foo targets into Makefile, and invoke
only the bare-minimum ones needed for each individual CI
step in setup_environment.sh.

Also add a retry to the golangci-lint curl, in hopes of
dealing with network flakes. And remove the -f (fail)
because it produces unhelpful logs.

Reason: saw about 25% CI flakes yesterday due to the golangci-lint
fetch, something about a timeout, and this was especially frustrating
because none of the steps actually needed lint. Quick reminder:
avoid network fetches unless absolutely necessary.

Fixes: #15892

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-27 05:52:34 -06:00
Chris Evich 527fc409e5
Cirrus: Add golang code consistency check script
Depends on #15893

Fixes: #15913

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-26 11:57:20 -04:00
OpenShift Merge Robot cf6136ffa5
Merge pull request #15813 from praveenkumar/podman-remote-container-file
[CI:BUILD] Contrib: Add containerfile to create podman-remote binary image
2022-09-26 16:32:30 +02:00
Praveen Kumar 8c627dfb57 Contrib: Add containerfile to create podman-remote binary image
Try to partial address #14664

Signed-off-by: Praveen Kumar <kumarpraveen.nitdgp@gmail.com>
2022-09-26 10:34:13 +05:30
Chris Evich 69ac1e36c4
Cirrus: Catch use of deprecated io/ioutil package
At the time of this commit, there's no easier way to detect this using
`golangci-lint` or the go tool (that I could find).  A future update
to the `go list` command may support detection, for now use a CI script.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-23 10:53:42 -04:00
Anjan Nath 23195646dc pkginstaller: use path_helper to add podman and helpers to path
path_helper(8) appends the contents of /etc/paths.d/podman-pkg to the
PATH env

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-09-19 12:08:01 +05:30
Jason T. Greene 744878a71c Add win-installer build/verify workflows to CI
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 16:17:31 -05:00
Jason T. Greene ecb9f99b88 Add new windows installer and build
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 16:12:09 -05:00
Ed Santiago 5faf4eff10 Cirrus: pick UIDs/GIDs starting at 1500, not 1000
Reason: looks like UIDs 1001, 1003, 1006 are already taken
in the CI VMs.

Fixes: #15573

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-31 13:47:05 -06:00
OpenShift Merge Robot 36cf6f572a
Merge pull request #15489 from ashley-cui/makepkg
[CI:DOCS] Automatically set podman version in pkginstaller
2022-08-25 16:58:17 -04:00
Ashley Cui b27bfbc71e [CI:DOCS] Automatically set podman version in pkginstaller
Allow the pkginstaller makefile target to take advantage of Podman's version binary, alleviating the need to manually set Podman's version (and inevitably forgetting to do so). This means the pkginstaller Makefile will automatically detect what version of Podman we're packaging.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-08-25 16:07:18 -04:00
SeongChan Lee 0e6a421ca6 Use tmpfiles.d specifiers instead of fixed path
Rootless Docker daemon exposes its API socket on
`$XDG_RUNTIME_DIR/docker.sock`. On tmpfiles.d, `%t` is same as
`$XDG_RUNTIME_DIR` in `--user` mode, and `/run` otherwise.
We can reuse the same config file for both mode with this change.

Signed-off-by: SeongChan Lee <foriequal@gmail.com>
2022-08-24 15:45:50 +09:00
Lokesh Mandvekar 2a6daa1e31
Cirrus: add podman_machine_aarch64
Run machine tests on every PR as label-driven machine test
triggering is currently hard to predict and debug.

Co-authored-by: Ed Santiago <santiago@redhat.com>
Co-authored-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-17 09:11:06 -04:00
Chris Evich a6af67ca90
Cirrus: Update podman-machine comment
Replace TODO comment with helpful hint for future maintainers.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-08-15 15:48:45 -04:00
Andrew Gunnerson d7f6d355b0
podman-kube@.service.in: Remove Restart=never option with typo
systemd expects the value of the option to be `no` instead, but this is
already the default behavior. This fixes the following warning when
running `systemctl status` on the unit:

    Failed to parse service restart specifier, ignoring: never

Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
2022-08-13 18:13:03 -04:00
William Entriken f26a5246e3
Fix updated link to install instructions
Signed-off-by: William Entriken <github.com@phor.net>
2022-08-11 20:34:59 -04:00
OpenShift Merge Robot 097cc6eb6d
Merge pull request #15225 from unknowndevQwQ/update_logo
[CI:DOCS]: update the podman logo
2022-08-09 14:28:59 +00:00
Anjan Nath 771a35e4b5 pkginstaller: use correct GOARCH value in case of arm build
to compile arm bits the GOARCH should be set to amd64 script
was wrongly using aarch64 instead

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-08 12:39:15 +05:30
unknowndevQwQ f4c53a41cf docs: update the podman logo
for podman/#15222

Signed-off-by: unknowndevQwQ <unknowndevQwQ@pm.me>
2022-08-07 09:11:53 +08:00
Lokesh Mandvekar 7ebaabb930
[CI:COPR] podman.spec.rpkg: add python3 dependency for el8
EL8 builds are failing because hack/markdown-preprocess needs python3
which AFAICT isn't included by default in EL8 build environments.

This commit also includes an additional `[CI:COPR]` mode which is
currently runs the same tests as `[CI:DOCS]` but could differ in future.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-05 16:11:17 -04:00
Anjan Nath 623b0c57f6 pkginstaller: use correct GOARCH while building podman binaries
we were not using the correct GOARCH to build the podman remote
and podman-mac-helper binaries, this uses the ARCH value passed
to the make invocation to set the GORACH

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 16:54:11 +05:30
openshift-ci[bot] 0f002c1600
Merge pull request #15105 from anjannath/sign-qemu
Add steps to sign included qemu and notarize the built pkg
2022-08-03 17:55:57 +00:00
Anjan Nath 44212b90bb pkginstaller: makefile improvements to avoid redownloading
this updates downloading of gvproxy and qemu using a standard
makefile rule which will avoid downloading them again if  its
already downloaded

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-03 21:20:10 +05:30
Anjan Nath e6670cd297 pkginstaller: add makefile target to notarize the built pkg
[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-03 21:20:10 +05:30
Anjan Nath c5029d2eea pkginstaller: sign qemu-system-* binary for the pkg
add file hvf.entitlements which has the com.apple.security.hypervisor
entitlement needed for qemu

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-03 21:20:10 +05:30
Lokesh Mandvekar 3a7a275c34
Cirrus: use dnf instead of rpm to install packages
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-02 14:19:48 -04:00
Ed Santiago 6764fe03d0 CI: new check for leftover skips/fixmes
If a PR says "Fixes #123", make sure it removes skips and/or
FIXME comments that reference issue 123.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-28 09:00:31 -06:00
Lokesh Mandvekar da98c88778
Cirrus: enable Fedora 36 aarch64 tasks on EC2
new file:   test/e2e/config_arm64.go

Tests that fail on aarch64 have been skipped with
`skip_if_aarch64`.

Co-authored-by: Chris Evich <cevich@redhat.com>
Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-07-27 15:27:52 -04:00
OpenShift Merge Robot 5397a00a1c
Merge pull request #14540 from anjannath/pkginstaller
Add support for building macOS pkg installer
2022-07-27 02:02:44 +02:00
Anjan Nath c35ae7640c Add support for building macOS pkg installer
it installs podman and supporting binaries along with
qemu to have a functioning podman install using a pkg

podman and podman-mac-helper  is compiled from source

gvproxy binary is downloaded from its github releases
and qemu from github release of containers/podman-machine-qemu

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-07-26 21:05:17 +05:30
Ed Santiago 0a160fed77 Bump VMs, to Ubuntu 2204 with cgroups v1
...and enable the at-test-time confirmation, the one that
double-checks that if CI requests runc we actually use runc.
This exposed a nasty surprise in our setup: there are steps to
define $OCI_RUNTIME, but that's actually a total fakeout!
OCI_RUNTIME is used only in e2e tests, it has no effect
whatsoever on actual podman itself as invoked via command
line such as in system tests. Solution: use containers.conf

Given how fragile all this runtime stuff is, I've also added
new tests (e2e and system) that will check $CI_DESIRED_RUNTIME.

Image source: https://github.com/containers/automation_images/pull/146

Since we haven't actually been testing with runc, we need
to fix a few tests:

  - handle an error-message change (make it work in both crun and runc)
  - skip one system test, "survive service stop", that doesn't
    work with runc and I don't think we care.

...and skip a bunch, filing issues for each:

  - #15013 pod create --share-parent
  - #15014 timeout in dd
  - #15015 checkpoint tests time out under $CONTAINER
  - #15017 networking timeout with registry
  - #15018 restore --pod gripes about missing --pod
  - #15025 run --uidmap broken
  - #15027 pod inspect cgrouppath broken
  - ...and a bunch more ("podman pause") that probably don't
    even merit filing an issue.

Also, use /dev/urandom in one test (was: /dev/random) because
the test is timing out and /dev/urandom does not block. (But
the test is still timing out anyway, even with this change)

Also, as part of the VM switch we are now using go 1.18 (up
from 1.17) and this broke the gitlab tests. Thanks to @Luap99
for a quick fix.

Also, slight tweak to #15021: include the timeout value, and
reword message so command string is at end.

Also, fixed a misspelling in a test name.

Fixes: #14833

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-21 20:08:32 -06:00
Chris Evich bc6a48eebb
[CI:DOCS] Cirrus: Add prominent gitlab warning
It was not obvious enough in the scripts how much of a snowflake this
environment is.  Fix that with lots of capitalized words and asterisks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-21 13:51:01 -04:00
Daniel J Walsh 5f848d89ed
Run codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:42:04 -04:00
Ed Santiago da8c6a8eaf CI: sanity check for desired runtime
We're still not testing runc in CI (#14833), and it may be weeks
or months before we can, due to criu/glibc nightmare, but one day
we'll be back on track, then later on we'll update VMs again,
and screw it up, and lose runc, and not notice, and RHEL will
break, and oh noes headless chicken again, repeat repeat.

We can do better. Use .cirrus.yml to explicitly define which
VMs should use which runtimes, and enforce it early in the
CI build step. This should never fail (uh huh) in a PR,
only in one of the update-VM PRs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-12 08:47:09 -06:00
openshift-ci[bot] a51a63023c
Merge pull request #14896 from edsantiago/logformatter_by_task
logformatter: link by *task ID*, not build ID
2022-07-12 13:54:11 +00:00
Erik Sjölund 377057b400 [CI:DOCS] Improve language. Fix spelling and typos.
* Correct spelling and typos.

* Improve language.

Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-11 21:59:32 +02:00
Ed Santiago 3ed323e1bb logformatter: link by *task ID*, not build ID
Reason: task IDs are unique and permanent; linking by
build ID and task name is non-unique, because Re-run.

Fixes: #14863

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-11 12:54:16 -06:00
Chris Evich 8cff1c2bf8
Cirrus: Add podman-machine integration test
The podman-machine integration tests are designed to execute on
bare-metal, since they perform significant work with virtual-machines.
This test is costly to run at scale, so it is limited to being manually
triggered by developers (for now).  A 'trigger' button will appear in the
task status page of the Github WebUI once all test dependencies are met.
In the Cirrus-CI WebUI, there is also a 'pre-trigger' button that may be
pressed if a developer doesn't wish to wait. Also:

* Add a `localmachine` target in the `Makefile` on the off-chance
  developers wish to execute locally.  Update the `ginkgo-run` target
  to accommodate re-use by the new `localmachine` target.
* Exclude `podman_machine` task from `success` dependency verification.
  This also involves adding an exception to `cirrus_yaml_test.py`
  otherwise it will complain loudly.
* ***NOTE*** Inclusion of `ec2_instance` in *any* task will cause
  `hack/get_ci_vm.sh` to barf and be non-functional.  Future updates will
  be made to restore functionality.  Before then, simply comment out
  the `ec2_instance` section as a temporarily workaround.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-01 11:25:47 -04:00
Chris Evich f58d7dbdab
Cirrus: Fix elevator workaround multi-cloud support
In order to support execution on various non-GCP cloud environments, the
BFQ scheduler workaround needs updating.  Previously it assumed the root
disk was always `/dev/sda`.  With the addition of new clouds (AWS) and
different environment types, the assumption is not always valid.  Update
the workaround to take care in looking up the block device where '/'
comes from.

Also update the scheduler to 'none', as all modern clouds already have
highly optimized underlying storage configurations.  There's no reason
to complicate I/O paths further by hard-coding specific scheduler(s) for
all environment types.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-01 11:25:47 -04:00
Valentin Rothberg c6fb533ca6 podman-play-kube template: rename to podman-kube
With the upcoming plans of introducing a podman-kube command with
various subcommands, rename the podman-play-kube systemd template
to podman-kube before releasing it.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-30 17:09:51 +02:00
Chris Evich 64ec894c51
[CI:DOCS] Update podmanimage comment.
Drop a reference as to why the `rpm --setcaps...` line is needed, along
with a `TODO` reminder to check if it's still needed.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-29 11:35:56 -04:00
cdoern 6d3520e8b7 podman image scp remote support & podman image scp tagging
add support for podman-remote image scp as well as direct access via the API. This entailed
a full rework of the layering of image scp functions as well as the usual API plugging and type creation

also, implemented podman image scp tagging. which makes the syntax much more readable and allows users t tag the new image
they are loading to the local/remote machine:

allow users to pass a "new name" for the image they are transferring
`podman tag` as implemented creates a new image im `image list` when tagging, so this does the same
meaning that when transferring images with tags, podman on the remote machine/user will load two images
ex: `podman image scp computer1::alpine computer2::foobar` creates alpine:latest and localhost/foobar on the remote host

implementing tags means removal of the flexible syntax. In the currently released podman image scp, the user can either specify
`podman image scp source::img dest::` or `podman image scp dest:: source::img`. However, with tags this task becomes really hard to check
which is the image (src) and which is the new tag (dst). Removal of that streamlines the arg parsing process

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-06-28 08:54:19 -04:00
Chris Evich 09754d21d0
[CI:DOCS] Minor update to podmanimage upstream docs
Add a reference to where/how podman is compiled for the 'upstream'
flavored image.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-24 10:52:06 -04:00
openshift-ci[bot] 8e88abda85
Merge pull request #14608 from edsantiago/logformatter_new_url
logformatter: link to logs using Cirrus API
2022-06-22 21:20:31 +00:00
Ed Santiago ef563c5a1e logformatter: link to logs using Cirrus API
One day we may use AWS for part of CI. Do you want to maintain
two separate code paths in this script for linking to artifacts
in multiple cloud providers? Can you say no? I knew you could.

Cirrus already knows the location of the artifacts and provides
a transparent mechanism for accessing them. Use it.

This PR exposed a nasty bug in our environment-variable handling:
envariables passed through to the containerized environment were
being double-space-escaped, so "FOO=a b" ended up as "FOO=a\ b"
(with a backslash), with one consequence being invalid URLs.
The solution is simple: run 'podman -e FOO', not '-e FOO=value'.

Finally, reinstate the environment-variable dump (in comments).
I had removed this in a moment of panic over leaking secrets,
but no, that doesn't happen. Exclude scary-sounding vars anyway.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-22 11:26:15 -06:00
Erik Sjölund aa4279ae15 Fix spelling "setup" -> "set up" and similar
* Replace "setup", "lookup", "cleanup", "backup" with
  "set up", "look up", "clean up", "back up"
  when used as verbs. Replace also variations of those.

* Improve language in a few places.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-06-22 18:39:21 +02:00
Jason T. Greene ce3d0954a5 Open Windows tutorial after MSI installation
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-06-16 23:46:24 -05:00
OpenShift Merge Robot dfdc95754e
Merge pull request #14519 from rhatdan/Dockerfile
[CI:DOCS] Podman images generated with empty /etc/containers/storage.conf
2022-06-07 16:00:46 -04:00
OpenShift Merge Robot 496677925a
Merge pull request #14516 from cevich/podmanimage_docs
[CI:DOCS] Minor: Fix podmanimage README links
2022-06-07 15:58:34 -04:00
Daniel J Walsh 126686f3d7
Podman images generated with empty /etc/containers/storage.conf
The Containerfiles were built with sed -i, which is leading to empty
storage.conf files. This will cause Podman in a container to print
warning information about storage.driver not being set to something.

[NO NEW TESTS REQUIRED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-07 14:43:01 -04:00
Chris Evich 20aaaa382c
Minor: Fix podmanimage README links
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-07 13:48:51 -04:00
Chris Evich 5fc3d871ad
Cirrus: Simplify only_if/skip + optimize multiarch
Using both the 'skip' and 'only_if' features at the same time may be
hard for maintainers to decipher.  Consolidate them into `only_if` since
that bypasses creation of the task all together - meaning there are
potentially fewer tasks for a developer to scroll through.

Since the `multiarch` Cirrus-Cron build no-longer depends on the direct
"build-ability" from the current repo. state, it can be further
optimized.  When operating in this context, avoid running many/most
other tasks, depending instead only on `ext_svc_check`.

Finally, add a simple document describing the various runtime contexts
along with the list of expected tasks.  Reference this prominently right
in front of every `only_if` so it's impossible for a maintainer to miss.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-07 11:39:26 -04:00
Chris Evich 335925f47f
Minor: Remove useless addition of storage.conf
This was an accidental leftover from an in-development implementation.
The `sed` command further down entirely replaces the file in the image.
Strip out the unnecessary 'storage.conf' ADD instruction.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-06 11:46:33 -04:00
tomsweeneyredhat 1fc5a107a0 [CI:DOCS] PodmanImage Readme touchup
@cevich recently renamed all the files named Dockerfile to Containerfile
in this directory.  Touching up the README.md to reflect that.

Also, as I was doing the submit, I noticed a couple of nits in the PR
request template and cleaned those up.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-06-04 15:19:09 -04:00
OpenShift Merge Robot 0dda468192
Merge pull request #14437 from cevich/fix_podmanimage
[CI:BUILD] Podman image: Mass cleanup + fix missing storage.conf
2022-06-03 13:17:14 -04:00
OpenShift Merge Robot 2777ecd53e
Merge pull request #14435 from cevich/makefile_empty
Makefile: Handle unexpected empty var. values
2022-06-02 14:40:22 -04:00
Chris Evich 3fa09e9dba
Makefile: Handle unexpected empty var. values
Fixes #14021

Substitution values built from `$(shell ...)` output can easily be empty
due to the shell's default `pipefail` behavior.  This can also hide
non-zero exit codes, similarly resulting in empty values being set.
While not a perfect fix, the situation is improved by using the
`err_if_empty` function in all cases where empty values would be
unexpected.  Remove the definitions for `GIT_BRANCH` and
`GIT_BRANCH_CLEAN` which don't seem to actually be used anywhere
(including in code).

Add a simple release-test to verify `podman info` outputs a non-empty
value for "GitCommit".

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-01 17:42:11 -04:00
Chris Evich fc95f832a5
Podman image: Mass cleanup + fix missing storage.conf
As of Fedora 36, `/etc/containers/storage.conf` with defaults is
installed under `/usr/share/containers/`.  This was causing builds
to fail in the necessary `sed` command that enables fuse-overlayfs.
Fix this by using sed on the new location with an output redirect
into the `etc` location.

Also, perform a mass-cleanup of the three files to make them easier
to read/maintain.  Including renaming them to `Containerfile`,
since all native build tooling is now used to produce them.

Lastly, take advantage of the `podman-next` copr repository to install
the latest/greatest podman from `main`, rather than building it from
scratch.  This will greatly speed up the image build speed.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-01 17:25:38 -04:00
Andrin Brunner 1933972909
Add ExecStop and dependencies to fix shutdown
Signed-off-by: Andrin Brunner <andrin@acloud.one>
2022-06-01 16:02:18 +02:00
Chris Evich 8c1128db4b
Cirrus: Fix several TODOs
Most were simply deleted, the main one addressed is in the
"pre-testing" `ext_svc_check.sh` script.  It will now verify
accessibility of several key test images we maintain in `quay.io`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-26 11:23:53 -04:00
OpenShift Merge Robot 948c5e915a
Merge pull request #13870 from kolyshkin/makefile-cleanups
Makefile: simplify for modern Go
2022-05-19 08:08:45 -04:00
Kir Kolyshkin 653117087f ci: pr-should-include-tests: add more exceptions
Add .golangci.yml, podman.spec.rpkg, and non top-level Makefiles.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-17 14:05:07 -07:00
Valentin Rothberg 8684d41e38 k8systemd: run k8s workloads in systemd
Support running `podman play kube` in systemd by exploiting the
previously added "service containers".  During `play kube`, a service
container is started before all the pods and containers, and is stopped
last.  The service container communicates its conmon PID via sdnotify.

Add a new systemd template to dispatch such k8s workloads.  The argument
of the template is the path to the k8s file.  Note that the path must be
escaped for systemd not to bark:

Let's assume we have a `top.yaml` file in the home directory:
```
$ escaped=$(systemd-escape ~/top.yaml)
$ systemctl --user start podman-play-kube@$escaped.service
```

Closes: https://issues.redhat.com/browse/RUN-1287
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-17 10:18:58 +02:00
Ed Santiago 37e30bcb27 Fix hang in build-each-commit test
Followup to #14178: I broke CI. "--fork-point" does not do
what I thought it did, so remove it.

Also, add 'set -x' to help us debug the next time something
like this happens.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-11 18:45:13 -06:00
OpenShift Merge Robot 32021ebc70
Merge pull request #14179 from cevich/ensure_dest_branch
Cirrus: Guarantee $DEST_BRANCH is passed through
2022-05-10 13:53:57 -04:00
Chris Evich 2b5778d416
Cirrus: Update images + new automation library
Add support for new automation library version w/ `$DEBUG` fix
(ref: containers/automation_images#128) and added definitions
for commonly used Distro/version variables.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-10 10:49:32 -04:00
Chris Evich abf4f77bc7
Cirrus: Simplify use of cache in automation
With the increasingly complex `.cirrus.yml` task relationships, build
cache wasn't always working as intended.  Recently, non-build tasks were
observed assuming authority over `gopath_cache`.  Ref.:
https://github.com/containers/podman/pull/13998#issuecomment-1108834538

Address this by an overall simplification using artifacts instead of
cache.  Using artifacts allows establishing concrete
authorship/authority over cached repo. content.  In this way, dependent
tasks may simply consume the artifact with `curl` instead of relying on
complex caching algorithms.

Also/Minor: Add YAML checking to the pre-commit configuration.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-10 10:49:32 -04:00
Chris Evich 237f761262
Cirrus: Simplify rootless ssh setup
The sshd service is guaranteed to be running by the VM image build
process - it's required by the packer tool for access.  Remove the
startup and check on the sshd service.

For many tests, man ssh connections to/from $ROOTLESS_USER on the
host are needed.  To facilitate this, the localhost key is added to
`known_hosts` for root and `$ROOTLESS_USER`.  Simplify this setup using
the `ssh-keyscan` tool.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-10 10:49:32 -04:00
Chris Evich c1656e2ee5
Cirrus: Guarantee $DEST_BRANCH is passed through
There are several runtime contexts (rootless and container) where
`$DEST_BRANCH` is needed but was not supplied.  A prior commit
(c486576717) removed the default value, `main` which was being
set incorrectly when CI ran on release branches.  Fix this by ensuring
the variable is non-empty upon entry to `setup_environment.sh`, then
ensure it gets passed through to child environments by way of the
`/etc/ci_environment` file.  This will maintain compatibility with
both CI and `hack/get_ci_vm.sh` use.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-10 10:22:01 -04:00
Ed Santiago 82f2b3edbc bloat check: make more robust
The use of 'C^' (parent) in 'git rebase' is counterintuitive,
at least to me: when C is a merge of multiple commits, rebase
picks each of those commits. That probably makes good sense
to a git expert, which I'm not.

Solution: forget using '^', just calculate the baseline sizes
by doing a checkout of the PR's parent.

Also: compute PR parent using git-merge-base instead of
blindly trusting $DEST_BRANCH (which may be volatile as
other PRs are merged).

Also: run git-rebase directly, not via make rule. That
indirection is too confusing here.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-10 05:44:55 -06:00
Ed Santiago c486576717 test skipper: check for $DEST_BRANCH
The test-skipping optimization is failing as rootless on non-main,
because $DEST_BRANCH is not set. Solution: check for envariable,
skip test if missing. (This was part of my original PR, but was
accidentally removed in #14013)

Also: DEST_BRANCH was silently being defaulted to 'main' in lib.sh.
Remove that: per @cevich, it is no longer necessary.

Fixes: #14131

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-09 13:14:25 -06:00
Chris Evich 9c0c29f086
Cirrus: Fix ownership of repos. to keep git happy
Newer versions of git are much more pedantic about who owns the
repository files.  When setting up to run rootless, prior to this
commit, the repo. ownership was changed from root.  This causes
all subsequent git-operations as root to fail:

    ```
    fatal: unsafe repository ('<$GOSRC>' is owned by someone else)
    ```

Fix this by re-ordering operations, such that the change in ownership is
done immediately before executing as a user.  Also disable the
git-ownership check on the source repository assuming the CI environment
is disposable.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-27 12:13:54 -04:00
Chris Evich cf449e81ab
Cirrus: Temporarily update netavark/aardvark-dns
Normally installing/updating packages at test runtime is highly
discouraged for reliability and efficiency reasons.  However, in this
specific case, development work of these packages is still fairly hot.
As a compromise to support podman test development, temporarily update
these two specific packages at runtime.  At a future date, when updates
are less frequent, this commit can/should be safely reverted.  At that
point, the versions installed at VM image build time will persist.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-27 12:13:54 -04:00
Chris Evich cd7cff6bb5
Cirrus: Test w/ netavark/aardvark-dns in F36+
Now that netavark and aardvark are packaged and default in F36, support
CNI-based testing in F35 and Ubuntu.

* Remove the temporary/special `$TEST_ENVIRON=host-netavark` construct.
* Remove dedicated/special integration and system testing tasks.
* Update test-config setup to properly handle CNI vs netavark/aardvark
  environments.
* Update package-version logging to operate based on installed packages
  (along with some other minor script cleanups).
* Update global environment setup to force `$NETWORK_BACKEND=netavark`
  in F36 and later.  Except when `upgrade_test` task runs.
* Discontinue installing netavark and aardvark-dns binaries from
  upstream build artifacts.
* Drop CGV1-vs-2 policy check.  Ubuntu VMs now exclusively test CGv1,
  Fedora VMs test CGv2, with F35 testing CNI and F36 testing Netavark.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-27 12:13:54 -04:00
Chris Evich 1a9f110b59
Cirrus: Fix skipping all/most tests
The originally intent for skipping tests based on change-content was to
optimize the PR workflow.  However, a mistake in a conditional is
causing almost all tasks running for Cron and branches to be skipped.
Fix this by checking for an empty '$CIRRUS_PR' variable.  This value is
always empty when operating outside of PRs.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-26 11:04:53 -04:00
Chris Evich c5e48f12ec
Cirrus: Re-fix build-cache miss on main
After merging #13998 it was observed that the `docker-py` task was still
failing with the same error on `main`.  The original quick-fix had
placed the full-build (`make`) call too late in the process.  This
commit moves it up to right before the `make install` call which was
resulting in an error.

Again, a further future commit is planned to re-work and simplify the
entire cache setup.  This is only a quick fix to make branch-builds
pass.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-25 15:33:11 -04:00
Chris Evich eb4e53087e
Revert "Cirrus: Fix cirrus cache race on bin/podman"
This reverts commit 2f53259a8d.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-25 15:31:36 -04:00
OpenShift Merge Robot 23d2bf5188
Merge pull request #13998 from cevich/fix_docker-py_test
Cirrus: Fix cirrus cache race on bin/podman
2022-04-25 13:40:01 -04:00
Chris Evich 2f53259a8d
Cirrus: Fix cirrus cache race on bin/podman
A suspected race on uploading gopath cache is causing the docker-py (and
possibly other) tasks to fail unpredictably with an error from `make`
regarding missing `bin/podman`.  Since this failure is affecting all
development activity, apply a quick/dirty fix to the failing task, by
simply rebuilding the binary.  A more comprehensive/long-term fix will
be worked in a future PR.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-25 11:30:14 -04:00