Commit graph

179 commits

Author SHA1 Message Date
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
Chris Evich cb900798ce
Cirrus: Document and codify base-image production
A number of images required for future testing are not present in GCE.
Importing them is a long proscribed process prone to errors and
complications.

Improve this situation by documenting, and encoding the majority of the
steps required.  Due to the required complexity, these are clearly
identified as 'semi-automated'.  This means a discerning eye is
sometimes needed to address unforeseen problems (networking issues,
format or packaging changes, etc).

Nevertheless, having these steps in writing, will reduce current and
future  maintenance burden while supporting future testing needs of
RHEL, Fedora and Fedora Atomic Host.

Also:

* Add necessary configuration, scripts, and Makefile updates needed to
  prepare RHEL, Fedora, & FAH cloud images for use in GCE.  This
  is a complex, multi-step process where the cloud image is booted
  un a local user-mod qemu-kvm instance, where it can be modified.
  From there, it's converted into a specific format, and imported into
  GCE.  Lastly, the imported raw disk data is made available as a GCE
  VM image.

  Note: As of this commit, the RHEL base-image builds (CentOS has native
  image), however neither RHEL or CentOS cache-images build correctly.

* Left testing on FAH disabled, the GCE/Cirrus integration needs needs more
  work.  Specifically, the python3-based google startup script service
  throws a permission-denied (as root) when trying to create a temp.
  directory.  Did not investigate further, though manually running the
  startup script does allow the libpod tests to start running.

* Enabled Fedora 29 image to execute tests and general use.

* Utilize the standardized F28-based container image  for gating
  of more the intensive unit and integration testing.  Update
  documentation to reflect this as the standard platform for
  these checks.  Rename tasks with shorter names and to better
  reflect their purpose.

* Cirrus: Trim unnecessary env vars before testing since the vast
  majority are only required for orchestration purposes.  Since most
  are defined within `.cirrus.yml`, it's a good place to store the
  list of undesirables.  Since each of the cirrus-scripts runs in
  it's own shell, unsetting these near the end will have no
  consequence.  Also trim down the number of calls to show_env_vars()

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
Chris Evich 8d7fdc7d79
Cirrus: Use Makefile for image-building
The packer tool takes JSON as input for the details of producing VM
images to be used for PR CI-testing.  JSON is not a very human-friendly
format, without support for comments and frequently containing lots of
duplicate data.

Fix this by using a Makefile + simple python one-liner to convert
from a human-friendly YAML format into packer-native JSON.  This allows
use of anchors/aliases to reduce duplication, and allows inline comments
for easier maintainability.  This also allows separating the 'test'
action from the 'build' action, for earlier and better syntax problem
detection.

Lastly, there are some minor ``lib.sh`` and ``integration_test.sh``
updates to support future work, and slightly improve the build and
test environments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
Giuseppe Scrivano a90f2218dc
test: update runc again
the regression we noticed in runc was fixed upstream:

https://github.com/opencontainers/runc/pull/1943

so we can use again runc from master.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-04 16:29:11 +01:00
Giuseppe Scrivano babb7c248b
cirrus: update ubuntu image
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-30 22:45:56 +01:00
Giuseppe Scrivano 2dfb7c02b1
Dockerfile, .cirrus.yml: update runc commit
we need to inherit this change from runc.

commit 869add33186caff4a22e3e11a7472a2d48d77889:

rootless: fix running with /proc/self/setgroups set to deny

    This is a regression from 06f789cf26774dd64cb2a9cc0b3c6a6ff832733b
    when the user namespace was configured without a privileged helper.
    To allow a single mapping in an user namespace, it is necessary to set
    /proc/self/setgroups to "deny".

    For a simple reproducer, the user namespace can be created with
    "unshare -r".

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-30 22:45:55 +01:00
Chris Evich d837dd3e2a
Update ubuntu VM image w/ newer runc
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-30 22:37:08 +01:00
Adrian Reber a40f5c0aba
Point CRIU_COMMIT to CRIU release 3.11
The old commit points to the development branch and is not stable.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-28 08:00:38 +01:00
Adrian Reber 453c8bac57
Updated CRIO_COMMIT to pull in new conmon for CRIU
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-28 08:00:37 +01:00
Chris Evich 2cc9b78ab9
Cirrus: Simplify optional system-test script
Previously it was required to call the verify, unit, and integration
scripts in order to build/install dependencies, and libpod.  This
wastes time during the (optional) system-testing, since the
actual unit/integration testing is also happening in parallel.

Consolidate only the distribution-specific build steps into the
system-testing script.  This way, only the required steps are performed
in their respective (parallel) tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
Chris Evich aa742e9e68
Cirrus: Reveal magic, parallel system-testing
Previously, several magic strings were in place to affect cirrus-ci
operations.  Two were buried within scripts.  One to optionally
execute system-tests within a PR. Another to avoid re-building
cache-images upon every merge.

Move these magic strings out into the open, buy locating their
logic up-front in the ``.cirrus.yml`` file.  This improves
readability and reduces surprise/astonishment at runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-11-13 13:30:48 -05:00
OpenShift Merge Robot 81cef49144
Merge pull request #1616 from cevich/cirrus_add_systemtest
Cirrus-CI: Add option to run system-tests
2018-11-07 08:06:07 -08:00
OpenShift Merge Robot 17716d787a
Merge pull request #1624 from cevich/update_fedora
Cirrus: Enable updating F28 image
2018-11-01 10:23:27 -07:00
Chris Evich 989affa2dd
Cirrus-CI: Add option to run system-tests
Normally, we would not run system-tests as part of PR-level CI, they're
simply too heavy-weight and complex.  However, in some instances it may
be desirable to provide a quick feedback loop, prior to release packaging
and official testing.  Enable this by executing the system-tests when
a magic string is present in the PR description:

``***CIRRUS: SYSTEM TEST***``

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:50:53 -04:00
Chris Evich 02eec644f1
Cirrus: Disable image build job abort on push
Normally cirrus will abort jobs if another push is made to a branch.
However, with image builds, other VMs are created/managed by packer.
Therefor if cirrus aborts a task, it's possible some packer managed VMs
will be left behind.  Disable this behavior for image-building only.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:48:31 -04:00
Chris Evich ed67d302ef
Cirrus: Enable updating F28 image
Previously this was disabled as some package was breaking networking on
GCE after updating + rebooting.  This is fixed now, so we should update
packages when building the fedora test VM image.

https://pagure.io/cloud-sig/issue/292

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-31 09:47:43 -04:00
Chris Evich 8126eb8a39
Update the runc commit used for testing
Use image ubuntu-1804-bionic-v20180911-libpod-63a86a18 which was built
with RUNC_COMMIT 78ef28e63bec2ee4c139b5e3e0d691eb9bdc748d.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-29 18:32:41 -04:00
Chris Evich 2c7ad7af50
Cirrus: Use images w/ buildah fix
Ref: https://github.com/containers/buildah/pull/1109

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-23 12:25:32 -04:00
OpenShift Merge Robot 79befd5158
Merge pull request #1648 from cevich/cirrus_podbot
Add simple IRC messenger
2018-10-23 07:41:43 -07:00
Chris Evich 89b5484ad2
Cirrus: Install CRIU in test images
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:09 -04:00
Chris Evich a18494a345
Cirrus: Use different CNI_COMMIT for Fedora
Just noticed this in Dockerfile.Fedora.  Updated all the right
places to make this happen.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:08 -04:00
Chris Evich 02bc3c9962
Fix Cirrus/Packer VM image building
An invalid GCE value is being passed to packer, preventing it from
building VM images.  Fix this, and centralize the definition of the
image name suffix by setting it at ``setup_environment.sh`` call-time,
rather encoding inside packer's `libpod_images.json`.  This makes
the value available for use by other scripts.

Also, switch the unique component of the name, to be based on the
commit-sha being tested.  This will improve traceability, since the git
history is more permanent than the `CIRRUS_BUILD_ID` env. var.  The
later is subject to log-rotation, destroying evidence of the images
source state.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:37:08 -04:00
Chris Evich 4de69da7bd
Revert "Cirrus: Enable debugging delay on non-zero exit"
This reverts commit b610913ef5.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich 0c17f2010a
Cirrus: IRC message when cirrus testing successful
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich a50410467a
cirrus: Add simple IRC messenger
Add a naive python script that's able to connect to IRC and send a
single line of text to the #podman channel.  Wrap this in a new
library function to ensure nick-name collisions are unlikely.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-18 12:33:36 -04:00
Chris Evich b610913ef5
Cirrus: Enable debugging delay on non-zero exit
There have been some python-podman flakes observed across multiple CI
systems.  Support capturing a VM for further investigation in the
event of a non-zero exit.  This is done by printing a warning message
and delaying script-exit for a long time.  Hopefully a human will notice
and have an opportunity to enable deletion-protection on the VM.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-15 09:48:19 -04:00
Chris Evich 52f0547f64
Re-add source-verify in cirrus-ci
Don't waste GCE VM resources for 30-min of testing,
when verify would fail after 3-minutes.  This is
the simpelest mechanism to save cloud CPU-time
while GCE is under trial-status (can not set quotas).

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-05 11:23:21 -04:00
Chris Evich eef2cb01ca
Lower CPU/Memory usage by cirrus VMs
These can increase again, once we have more control over setting quotas
in GCE.  At the moment it's limited because of trial-account status.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-05 11:05:58 -04:00
Chris Evich c53163b75a
Add configuration for Cirrus-CI
Testing podman requires exercising on a full-blown VM.  The current
containerized-approach is complicated, and mostly a band-aid over
shortcomings in the other CI systems.  Namely, we want:

* To pre-build environments with dependencies to reduce the
  setup time needed for testing.
* The ability to verify the pre-built environments are working
  before utilizing them for further testing.
* A simple, single set of flexible automation instructions to
  reduce maintenance burden.
* Ease of environment reproduction across clouds or locally, for
  debugging failures.

This change leverages Cirrus-CI + Packer + collection of shell scripts
to realize all of the above.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-10-04 16:30:48 -04:00
baude 2c79b8e22e disable gce building of images
Signed-off-by: baude <bbaude@redhat.com>
2018-10-04 11:22:41 -05:00