Commit graph

179 commits

Author SHA1 Message Date
Chris Evich d36c62d88d
Revert "Cirrus: Temp. workaround missing imgprune image"
This reverts commit 9b2e98f1e8.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 15:04:30 -04:00
Chris Evich b843804d51
Adjust get_ci_vm.sh for substitution
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 12:01:55 -04:00
Chris Evich 5f99703594
Cirrus: Add verification for cgroupv2 image
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 12:01:55 -04:00
Chris Evich 7508179ed9
Cirrus: Add experimental fedora VM image & test
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-12 12:01:55 -04:00
Giuseppe Scrivano 2f8451468c
cirrus: add tests with crun on Fedora 30
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-08-12 15:01:51 +02:00
Chris Evich 0a05af1dd6
Cirrus: Add Second partition for storage testing
This is mainly/initially to support use of Cirrus-CI
in https://github.com/containers/buildah since that setup
re-uses the VM images from this project. However, it also
opens doors here, if libpod ever needs/wants to do things
with a dedicated storage device and/or storage-drivers.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-08-01 14:07:55 -04:00
Chris Evich 3e3afb942a
Cirrus: Fix release dependencies
The release-task ***must*** always execute last, in order to guarantee a
consistent cache of release archives from dependent tasks.  It
accomplishes this by verifying it's task-number matches one-less than
the total number of tasks.  Previous to this commit, a YAML anchor/alias
was used to avoid duplication of the dependency list between 'success'
and 'release'

However, it's been observed that this opens the possibility for
'release' and 'success' tasks to race when running on a PR.  Because
YAML anchor/aliases cannot be used to modify lists, duplication is
required to make 'release' actually depend upon 'success'.

This duplication will introduce an additional maintenance burden.
Though when adding a new task, it's already very easy to forget to
update the 'depends_on' list.  Assist both cases by the addition
unit-tests to verify ``.cirrus.yml`` dependency contents and structure.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-31 11:49:53 -04:00
Chris Evich 6146a3ad0f
Cirrus: Remove fixed clone depth
It's been observed on several occasions, some tests fail in git clones
with a "cannot find ref" type error.  Especially in the depth=1 cases.
Since there's really only one place where limiting the depth makes sense
(build-each-commit), simply remove all the other limits.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-26 11:50:44 -04:00
Chris Evich ac5ad9acbf
Cirrus: Bypass release during image-building
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 15:20:57 -04:00
Chris Evich 23722e644e
Cirrus: Remove disused COMMIT variables
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-25 13:51:33 -04:00
OpenShift Merge Robot 7dbc6d8f36
Merge pull request #3619 from cevich/workaround_missing_iamge
Cirrus: Temp. workaround missing imgprune image
2019-07-23 19:40:52 +02:00
OpenShift Merge Robot 26749204d5
Merge pull request #3621 from baude/golangcilint4
golangci-lint phase 4
2019-07-23 10:21:41 +02:00
baude 0c3038d4b5 golangci-lint phase 4
clean up some final linter issues and add a make target for
golangci-lint. in addition, begin running the tests are part of the
gating tasks in cirrus ci.

we cannot fully shift over to the new linter until we fix the image on
the openshift side.  for short term, we will use both

Signed-off-by: baude <bbaude@redhat.com>
2019-07-22 15:44:04 -05:00
Peter Hunt 53e1ede46b bump cirrus images to get new conmon
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-22 15:57:23 -04:00
Peter Hunt 0671dca90d bump conmon to 1.0.0-rc2
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-07-22 13:20:51 -04:00
Chris Evich 9b2e98f1e8
Cirrus: Temp. workaround missing imgprune image
The 'image_prune' task only runs on master, post-merge and
is currently failing for all builds.  This is because it
references a non-existent image.  The person with access
to add/enable this image is on PTO.  Fix this by temporarily
using a hand-built image until an automatic build can be added.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-22 10:49:31 -04:00
Chris Evich 4c6e8aa6e2
Cirrus: Fix post-merge env. var. not set.
Cirrus-CI automatically sets `$CIRRUS_BASE_BRANCH` during PR testing.
This is used for the `build_each_commit` task, in order to compute the
commit-chain properly.  However, prior to this commit and after a PR
merges, the post-merge `build_each_commit` task would fail with
something similar to:

```
make build-all-new-commits GIT_BASE_BRANCH=origin/$CIRRUS_BASE_BRANCH |& ${TIMESTAMP}
[12:28:59] START - All [+xxxx] lines that follow are relative to right now.
[+0000s] # Validate that all the commits build on top of origin/
[+0000s] git rebase origin/ -x make
[+0000s] fatal: invalid upstream 'origin/'
[+0000s] make: *** [Makefile:426: build-all-new-commits] Error 128
[12:28:59] END - [+0000s] total duration since START
Exit status: 2
```

This is because `$CIRRUS_BASE_BRANCH` is undefined when CI runs against
a branch (by design).  This commit fixes the problem by referring to
`$DEST_BRANCH` instead.  This variable must always point at the intended
destination branch for testing, and so can be used in this context as
well.

Also updated a few comments to help steer understanding of the
`$DEST_BRANCH` purpose.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-19 14:30:35 -04:00
OpenShift Merge Robot 04a9cb01fe
Merge pull request #3335 from cevich/imgprune
Cirrus: Print images that should be pruned
2019-07-17 11:47:42 +02:00
Chris Evich efdb7ad8f2
Cirrus: Use images w/o periodic svcs
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-16 14:30:42 -04:00
Chris Evich 35c174f723
Cirrus: Abstract destination branch refs.
Various tasks and scripts behave differently depending on whether or not
the build is running against a PR or on a branch, post-merge.  However,
a great number of them are hard-coded to the string 'master' as the
destination.  Since this is not always the case (there are other
relevant branches), it makes sense to abstract the references with a
single definition.

Add a top-level `$DEST_BRANCH` variable to CI, and otherwise
default to 'master' when unset.  This enables running CI builds on
additional branches without the overhead of updating all the static
references to 'master'.  Simply update `$DEST_BRANCH` at the top-level
and all branch-conditional logic will function as intended.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-15 16:42:41 -04:00
Chris Evich e8564dc44f
Cirrus: Print images that should be pruned
Over time unless they're removed, the project could grow quite a large
collection of VM images.  While generally cheap (less than a penny each,
per month), these will become a significant cost item if not kept
in-check.

Add a specialized container for handling image-pruning, but limit
it to only finding and printing (not actually deleting) images.

Also update the image-building workflow so that base-images used to
compose cache-images are also labeled with metadata.

N/B: As an additional safeguard, the service account which
     executes the new container in production *DOES NOT*
     have access to delete images.  This can be enabled
     by adding the GCE IAM role: CustomComputeImagePrune

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-15 15:26:26 -04:00
Chris Evich dc385fc8b6
Cirrus: Update to freshly built cache-images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-12 08:44:28 -04:00
Chris Evich 6946fe05ed
Cirrus: Execute system-tests during image-validation
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-12 08:44:27 -04:00
Chris Evich 7678a1ef90
Cirrus: Fix #3543: Failure in 'release' task
Normally when testing PRs, the final task to run is 'success'.  It's
purpose is three-fold:

- Notify on IRC that a PR passed all testing.
- Block merging of a PR unless all dependent tasks are successful.
- When successful, publish cached binary release archives.

Mistakenly, the 'release' task was not made dependent upon the 'success'
task.  Since 'success' only runs for PRs, this was causing post-merge
failures due to the 'release' task not finding any release archives -
the tasks which generate them are still running.

Fix this by making the 'release' task depend upon the same items as
the 'success' task.  This will ensure it only runs as the very last
step, for both PRs and on branches (post-merge).

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-10 10:32:48 -04:00
Chris Evich 61b20df9e6
Cirrus: Fix 473d06045 / enable build_without_cgo
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-10 09:52:31 -04:00
OpenShift Merge Robot 81e722d086
Merge pull request #3106 from cevich/cirrus_release
Cirrus: Automate releasing of tested binaries
2019-07-10 15:08:03 +02:00
OpenShift Merge Robot 7633bd3b1b
Merge pull request #1936 from cevich/cirrus_packaged_deps
Cirrus: Use packaged-based dependencies
2019-07-09 00:16:45 +02:00
Chris Evich 1ef8637ae3
Cirrus: Automate releasing of tested binaries
It's desirable to make archives available of builds containing actual
tested content.  While not official distro-releases, these will enable
third-party testing, experimentation, and development for both branches
(e.g. "master") and pull requests (e.g. "pr3106").

* Add a Makefile targets for archiving both regular podman binaries
  and the remote-client.  Encode release metadata within these
  archives so that their exact source can be identified.

* Fix bug with cross-compiling remote clients for the Windows and Darwin
  platforms.

* Add unit-testing of cross-compiles for Windows and Darwin platforms.

* A few small CI-script typo-fixes

* Add a script which operates in two modes:

  1. Call Makefile targets which produce release archives.
     Upload the archive to Cirrus-CI's built-in caching system
     using reproducible cache keys.

  2. Utilize reproduced cache keys to attempt download of cache
     from each tasks.  When successful, parse the file's
     release metadata, using it to name the archive file.  Upload
     all recovered archives to a publicly accessible storage bucket
     for future reference.

* Update the main testing task to call the script in mode #1 for
  all primary platforms.

* Add a new `$SPECIALMODE` task to call the script in mode #1 for
  Windows and Darwin targets.

* Add a new 'release' task to the CI system, dependent upon all other
  tasks.  This new tasks executes the script in mode #2.

* Update CI documentation

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-07-03 16:51:21 -04:00
Giuseppe Scrivano 473d060454
cirrus: add test for compiling without cgo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-02 16:41:11 +02:00
Chris Evich 3d559df540
Cirrus: Use packaged dependencies
Building/installing dependencies from fixed source-version ensures
testing is reliable, but introduces a maintenance burden and
risks testing far outside of a real-world environment.  The
sensible alternative is to install dependencies from distro-packaging
systems.

Install all development and testing dependencies at VM cache-image build
time, to help ensure testing remains stable.  The existing cache-image
build workflow can be utilized at any future time to build/test
with updated packages.

***N/B***: This does not update any dockerfiles used by testing, that is
left up to future efforts.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-27 09:05:26 -04:00
Chris Evich cd78825be7
Cirrus: More tests to verify cache_images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-25 15:45:12 -04:00
OpenShift Merge Robot 72260a296c
Merge pull request #3414 from vrothberg/go-modules
Go modules
2019-06-24 16:52:02 +02:00
Valentin Rothberg d697456dc9 migrate to go-modules
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-24 13:20:59 +02:00
Peter Hunt a06bb80b4b update cirrus image
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 11:39:29 -04:00
Peter Hunt 284208a238 Update conmon to include attach socket unlink
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-21 10:55:24 -04:00
OpenShift Merge Robot 7be87f5551
Merge pull request #3078 from cevich/cirrus_f30
Cirrus F30
2019-06-19 16:13:47 +02:00
Ed Santiago d6f436204f run BATS tests in Cirrus
I'm running the BATS tests manually once in a while, and
catching several problems each week that make it past
the rest of CI. Since the BATS tests run at RPM gating
time, we need to catch problems earlier. Try running
the tests from Cirrus.

Tests will be skipped on Ubuntu due to a too-ancient
version of coreutils (8.28; the 'timeout -v' we use
requires 8.29).

Tests are run *after* integration tests, even though
these take three minutes and would be nice to have
fail quickly, because running before causes bizarre
CI failures. Shrug.

UPDATE: also fix run test, broken by #3311.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-06-17 13:41:14 -06:00
OpenShift Merge Robot 058c93f850
Merge pull request #3308 from cevich/always_collect_logs
Cirrus: Simplify log collection commands
2019-06-17 21:38:25 +02:00
Chris Evich 11484580d3
Cirrus: Add support for testing F30
Remove disused `build_cache_images` task, and
update relevant dockerfiles for F30.

Fix problem of cloud-init failing to expand root-device on boot
(/var/lib/cloud/instance left in improper state).

Fix problem of cloud-init racing with google-network-daemon.service on
boot (looking for cloudconfig metadata too early).  Causing
root-device to _sometimes_ fail to expand.

Fix problem of hack/get_ci_vm.sh argument passing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 13:41:58 -04:00
Chris Evich 4e9f5e5f2b
Cirrus: Simplify log collection commands
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-14 08:49:18 -04:00
Peter Hunt ef9e0ec6cb Bump cirrus images
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-13 13:21:09 -04:00
Peter Hunt a3ed16416f Bump conmon to 0.3.0
This enables cgroup v2 OOM

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-06-13 12:03:57 -04:00
Chris Evich 8baa897356
Cirrus: New images w/o buildah
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-10 12:56:12 -04:00
Chris Evich ae16fa33d7
Cirrus: Minor cleanup of dependencies and docs
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-06 15:33:01 -04:00
Chris Evich e601c8ea38
Cirrus: Disable testing on F28 (EOL)
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-06-04 10:44:37 -04:00
baude d1c44ea856 split rootless local and remote testing
Signed-off-by: baude <bbaude@redhat.com>
2019-05-31 14:54:06 -05:00
Chris Evich 52c86775be
cirrus: update images w/ zip pkg
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-23 11:28:31 -04:00
Chris Evich bd0ac639bf
Cirrus: Fix missing CRIO_COMMIT -> CONMON_COMMIT
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 10:56:47 -04:00
Chris Evich 1a2055ffac
Cirrus: Stub in F30 support
New base-image boots, a cache-image builds, but more work is needed for
it to be prime-time ready.  This commit just adds some updates to the
scafolding necessary to build the base-image.  Future work will make F30
more of a reality.

Also add log-collection scripts to test image verification task

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich 95141f88d4
Cirrus: fixups based on review feedback
Also remove disused distros (RHEL/CentOS/FAH) and fix get_ci_vm script

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich c4d9b03f78
Cirrus: Overhaul/Simplify env. var setup
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:02 -04:00
Chris Evich 51a95e6ef1
Cirrus: Run tests on test-built cache-images
Also, add jq and catatonit installs to images.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:01 -04:00
Chris Evich 191a08ae43
Cirrus: Support testing of VM cache-image changes
Previously, it was quite difficult to affect changes to VM cache images
without lots of manual work.  This commit adds a new optional testing
task which mirrors the official-image build task which only runs on
master.  In contrast, the new task may be run at any time in a PR, but
including a magic phrase in the PR description.

Update documentation to describe the new task and inform on it's usage.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:01 -04:00
Chris Evich 84c6f7c55d
Cirrus: Remove "too new" runc hack
Hack was to workaround not having fix for:
https://bodhi.fedoraproject.org/updates/FEDORA-2019-b4356521ba

Update `RUNC_COMMIT` value to match commit id to working package.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-21 08:44:01 -04:00
Chris Evich 0f31c6bdc4
Cirrus: Confirm networking is working
Thanks to @edsantiago for suggestion to use nc

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-17 13:25:59 -04:00
OpenShift Merge Robot 95d90c1de7
Merge pull request #3127 from mheon/fix_start_race
Ensure that start() in StartAndAttach() is locked
2019-05-16 01:08:05 +02:00
Matthew Heon d1f82231d6 Add debug mode to Ginkgo, collect debug logs in Cirrus
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-05-15 12:07:16 -04:00
baude a86aa4b1e9 split remote tests from distro tests
We want the remote tests for our distributions to be tested in a
different VM than the local tests.  This allows for faster CI runs and
easier debug as well as seperation of flakes.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-13 12:17:55 -05:00
Chris Evich 6c8b548160
Cirrus: Add missing task dependencies
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-03 15:04:48 -04:00
Chris Evich b648ca0810
Cirrus: Add check for make varlink_api_generate
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-03 15:04:48 -04:00
Chris Evich 074a26f7a1
Cirrus: Add pipefail confirmation check
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-02 15:03:16 -04:00
Chris Evich 3ab67b9c30
Cirrus: timestamp all output script output
Also remove direct time-stamping by CI scripts that would compete.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-02 15:03:15 -04:00
OpenShift Merge Robot ad68036a88
Merge pull request #3031 from baude/remotewindows
enable podman-remote on windows
2019-05-01 16:20:41 +02:00
baude 0b6bb6a3d3 enable podman-remote on windows
build a podman-remote binary for windows that allows users to use the
remote client on windows and interact with podman on linux system.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-30 15:28:39 -05:00
OpenShift Merge Robot 8e84291643
Merge pull request #2992 from cevich/collect_audit_log
Cirrus: Collect audit log on success and failure
2019-04-30 20:41:29 +02:00
Chris Evich 3d6f787d7d
Cirrus: Collect audit log on success and failure
Also rename `master_script` -> `failed_master_script` to clarify it's
"place in the line" when viewing (Cirrus WebUI)

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-25 11:32:47 -04:00
Chris Evich 4072f2738b
Cirrus: Use freshly built images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-24 14:25:45 -04:00
Chris Evich c008cf569c
Cirrus: Bump up runc commit
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-24 14:25:45 -04:00
Brent Baude 23602de816 Revert "Switch to golangci-lint"
Signed-off-by: baude <bbaude@redhat.com>
2019-04-05 20:09:45 -05:00
Matthew Heon 5099f189a5 Increase CI resources to help avoid hitting timeouts
The build_each_commit task builds each commit in a pull request
to verify that we have a (at least minimally) functional Podman
at every point, to aid in bisecting.

This task is, right now, extremely slow, taking around 1m40s to
build each commit - which quickly grows unreasonable as PRs grow
to 10+ commits.

Upping resources available to the task should decrease time spent
in CI and reduce the risk of hitting timeouts.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-04 18:14:05 -04:00
Chris Evich 599714d9f2
Cirrus: Support special-case modes of testing
Previously libpod CI was fairly straight-forward, run unit and
integration tests in a standard set of 3 VMs.  Off on the side was a
single special case of running tests as an ordinary user.  There is a
desire to stop using the PAPR system to support testing inside of a
container.

Since having two special cases potentially invites more
down the road, make provisions to handle them more gracefully.  This
commit introduces an environment variable:  ``$SPECIALMODE``.  It's
value has the following meanings within the CI scripts:

Mode 'none': Nothing special, business as usual (default)
Mode 'rootless': Rootless testing
Mode 'in_podman': Build container, run integration tests in it.

This will make adding additional special-cases later easier, as well as
extending the special cases in a Matrix across multiple OS's.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-04-03 09:57:20 -04:00
Chris Evich bb068e46f0
Cirrus: Verify manpages for all subcommands exist
fixes #2630

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-21 10:47:27 -04:00
OpenShift Merge Robot bae1561c99
Merge pull request #2711 from cevich/parallel_vendor_check
Cirrus: Run vendor check in parallel
2019-03-20 07:02:10 -07:00
Chris Evich 85ff086820
Cirrus: Run vendor check in parallel
This task is heavily network bound, and takes way too long to include
along with the gating task.  Separate it out and run it in parallel
to everything else.  Also add some reasonable timeouts.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-19 17:14:40 -04:00
Chris Evich 37eb694bd0
Cirrus: Various fixes for rootless testing
* Randomize the user's UID and GID
* Simplify `setup_environment.sh`
* Support new "-r" option for `hack/get_ci_vm.sh` setting up rootless
* Connect as $ROOTLESS_USER when using "-r" with `hack/get_ci_vm.sh`

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-19 13:00:18 -04:00
baude c6b205be77
Enable rootless integration tests
Signed-off-by: baude <bbaude@redhat.com>
2019-03-19 15:01:48 +01:00
Chris Evich 8dd6edacff
Cirrus: Disable master-success IRC notices
Since `on_failure` notification is working, and IRC activity
is picking up, these messages mostly just get in the way.
Leave the PR-testing success messages in place for now,
since they're helpful when someone's waiting.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-18 13:37:22 -04:00
Chris Evich 51f223ec1c
Cirrus: Update VM Cache images
Undo short-term slirp4netns workaround (#2660)

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-18 11:25:38 -04:00
Chris Evich 0e76921048
Cirrus: Notify on IRC if post-merge testing fails
Until recently it was very difficult to execute any scripts if part of a
task failed.  A new feature in Cirrus-CI makes this easy.  Use it to
post a notice on IRC when any task fails.

Also: Add quotes around yaml-string values for consistency and
syntax-highlighting correctness.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-15 21:21:50 -04:00
baude c8ca027938 Add gating tasks
to protect against regressions, we need to add a few gating tasks:
 * build with varlink
 * build podman-remote
 * build podman-remote-darwin

we already have a gating task for building without varlink

Signed-off-by: baude <bbaude@redhat.com>
2019-03-13 12:10:35 -05:00
OpenShift Merge Robot b15273a0ca
Merge pull request #2531 from cevich/rootless_stub
Cirrus: Add dedicated rootless mode testing
2019-03-09 04:15:09 -08:00
Chris Evich 4531800f49
Cirrus: Use imgts container to record metadata
Make use of the built imgts container image to track
VM image usage statistics for every automation run.

Also update and add small check to the gate test
that verifies expected formatting/content of the
`.cirrus.yml` file WRT VM Image names.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-06 12:21:14 -05:00
Chris Evich 142442edaa
Cirrus: Add dedicated rootless mode testing
Certain integration tests require execution as a regular user.
This is acomplished by `PodmanTest.PodmanAsUserBase()` wrapping a
specialized execution environment, in `test/utils/utils.go`.  However,
doing this requires passing through python, which vastly increases the
complexity of debugging low-level problems.

This commit introduces a new parallel task, run as a regular user on the
VM as set by three environment variables.  All commands executed in the
``rootless_test.sh`` script, will occur as a real user with a name and
home directory, just as `$DIETY` intended.  All env. vars established
during `environment_setup.sh` (for root) are available.  The PR source
in `$GOSRC` and `$GOPATH` are owned by this user, and ready for use.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-05 11:03:37 -05:00
Chris Evich 842d19c90f
Cirrus: Stop testing on RHEL
It was found that after updating the cache-image for RHEL 7.6,
unpredictable integration tests start failing with 'permission denied'
errors.  Much effort was spent trying to diagnose this, as all other
platforms pass.

Since running the latest/greatest podman on RHEL, will never be
officially supported (by Red Hat - must use RPM podman) this matrix-item
is of questionable value.  Therefor, this commit disables RHEL testing.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-04 17:08:21 -05:00
Chris Evich a810d96b6c
Cirrus: Add BATS package for all platforms
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-04 17:08:21 -05:00
Matthew Heon bd9a18df15 Add a task to Cirrus gating to build w/o Varlink
We had a regression on master where we broke the build for
non-Varlink builds. Catch this in CI in the future.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-27 12:21:57 -05:00
Chris Evich 69c91e044a
Cirrus: Install Go 1.11 on Ubuntu VMs
There is no native package for this, so the packaged version must also
be installed, otherwise all the support/dependencies would be removed
also (like go-md2man).  Fix this by installing from the google released
tarball, into /usr/local/go and set $GOROOT to point there.

Also, include a small fix for hack/get_ci_vm.sh not installing
testing dependencies because of an old assumption.

***CIRRUS: REBUILD IMAGES***

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-02-22 12:07:36 -05:00
Valentin Rothberg 9ac0ebb079 Cirrus: add vendor_check_task
* Make sure that all vendored dependencies are in sync with the code and
  the vendor.conf by running `make vendor` with a follow-up status check
  of the git tree.

* Vendor ginkgo and gomega to include the test dependencies.

Signed-off-by: Chris Evic <cevich@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-06 11:14:06 +01:00
OpenShift Merge Robot 465e19b555
Merge pull request #2213 from cevich/cirrus_imgts_container
[skip ci] Cirrus: Container for tracking image use
2019-02-04 19:18:10 +01:00
Chris Evich 8ca6706be0
Cirrus: Add RHEL-7 testing
Add necessary tweaks to base-image build/import process so that image
can successfully boot with networking enabled.  Build the base image and
update ``.cirrus.yml`` accordingly.

Also make a minor improvement to cache-image building to help save space in
GCP image storage.  Namely, instead of storing every produced image, export
them into google storage buckets w/ life-cycle enabled.  For production use,
they may be converted back into GCE images, otherwise they will expire after
a time.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-30 08:26:48 -05:00
Chris Evich 01e609d460
[skip ci] Cirrus: Container for tracking image use
Once built, this container can be utilized by automation to help keep
track of VM images.  All parameters are passed in via env. vars.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-24 08:47:08 -05:00
Chris Evich d0d02ab66b
Cirrus: Use freshly built images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-22 13:32:01 -05:00
Chris Evich d0876282a4
Cirrus: Consolidate VM image names in once place
Previously it was not possible to specify keys from the ``env`` section
in the various GCE sections.  Now that features is added, consolidate
all the cache image definitions into a single place, reducing
maintenance burden.

This also results in the names passing through into the VMs. This is
useful, e.g. for future tracking of image usage statistics.

Update get_ci_vm script hints for new image name definition format

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-01-17 13:30:06 -05:00
Matthew Heon 56c5c89408 Bump time for build_each_commit step
The limit of build_each_commit seems to be 17 commits - any more
and it times out. Give it a bit more time to work with.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-04 10:23:36 -05:00
Chris Evich 727f8faff6
cirrus: Use updated images including new crui
Also add two minor tweaks which were preventing images from building
properly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-21 16:08:21 -05:00
Chris Evich a15328b0e9
Cirrus: Skip build all commits test on master
Fixes:

    git rebase origin/ -x make
    fatal: Needed a single revision
    invalid upstream 'origin/'
    make: *** [Makefile:351: build-all-new-commits] Error 1

By not running this test post-merge.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-19 15:09:35 -05:00
Giuseppe Scrivano 98c5d9d962
Makefile: validate that each commit can at least build
it is very useful when using git bisect that at least the commit can
build.

got inspiration from: https://twitter.com/pid_eins/status/1072797993760423941

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-19 16:53:22 +01:00
Chris Evich 4bf7c4b62b
Cirrus: One IRC notice only
The podbot messages are becoming obnoxious as more distributions are
tested.  Only call the `success.sh` script once, after all testing was
successful.  Also make update the message to include more helpful text
and url.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-18 09:16:05 -05:00
Chris Evich 7b53e86e4f
Add script to create CI VMs for debugging
Frequently debugging of CI-related problems requires going hands-on
within the environment.  However, reproducing the environment by hand is
very tedious and error prone.  This script permits authorized users to
produce VM's based on any available cache-image, and automatically remove
them upon logout.

Also: Bump up VM disk sizes to 200GB due to performance reasons

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 14:34:43 -05:00
Chris Evich a1a5f3ba51
Cirrus: Migrate PAPR testing of F28 to Cirrus
Since the most recent TWO versions of Fedora are officially supported
upstream, both need to be tested.  Implement the concept of a 'prior'
Fedora release in both base-image and cache-image production.  Utilize
the produced cache-image to test libpod.  Remove F28 testing from PAPR.

Much thanks to @baude @giuseppe for help with this.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-14 11:19:41 -05:00