Commit Graph

18 Commits

Author SHA1 Message Date
Jan Kaluža
d041805986 Merge #1326 improve the reliability of the integration tests 2019-07-18 10:34:50 +00:00
Mike Bonnet
3681b66ff8 remove Declarative options from Scripted pipelines
These options don't work in Scripted pipelines, and cause tracebacks.
2019-07-10 08:29:22 -07:00
Mike Bonnet
934bc4bd05 wrap checkouts in retry(5)
Avoid failing jobs due to temporary errors when checking out from Pagure. This
should help work around transient DNS/network failures.
2019-07-03 18:16:52 -07:00
Mike Bonnet
30df0a82ca optimize checkouts
Only checkout exactly the code we need to run the tests. This should help work around
errors and timeouts (early EOF/index-pack failed) from Pagure. Jenkins seems to require
a minimum of depth=2 or it fails when walking the revision history.

Using a shallow clone is safe for PRs because we're always building from the head of
the PR branch (OpenShift doesn't have a way to specify a non-head commit on a PR branch).

When building from the master branch we use depth=10 to avoid a race condition in case
multiple commits have been pushed in quick succession. The integration test job is
launched using the exact revision of the code that was used to build the images, to
ensure the results are valid.
2019-07-03 18:16:30 -07:00
Mike Bonnet
e91cf37bf7 ignore PRs that aren't Open
Sometimes it is necessary recreate the Jenkins PR polling job, or
cleanup old runs. This can cause Jenkins to lose the record of which
PRs it has already seen, and retest old PRs which are long closed.
This change causes the polling job to check the state of the PR, and
ignore it if it isn't Open. Testing PRs which are in any other state
doesn't provide any value.
2019-07-03 11:55:18 -07:00
Mike Bonnet
302c76b90f add more information to the Pagure commit flags and PR status
This makes them more consistent with CentOS CI flags.

Also add the commit hash to the uid, so updates are commit-specific.
2019-06-25 21:41:38 -04:00
Mike Bonnet
d80316ebf2 Make pipeline job options consistent
Set a consistent set of options on Jenkins pipeline jobs. This includes timestamps,
reasonable timeouts, saving only the last 10 builds (to avoid filling up the disk
of the Jenkins master), disabling concurrent builds (to avoid hitting quota limits),
and skipping the default checkout (all jobs that need the source call checkout()
explicitly).
2019-05-16 12:22:47 -07:00
mprahl
a8eaac7c0a Build the JSON using Groovy in the failing integration test rather manually creating a JSON string 2019-05-16 09:32:22 -04:00
Matt Prahl
2db62eb897 Merge #1258 Run the integration tests from the current branch 2019-05-16 13:31:44 +00:00
Mike Bonnet
095fab0292 Run the integration tests from the current branch
Previously, the integration test pipeline was configured to always use the tests present on the
master branch. When running the pre-merge pipeline for a PR, this would result in potentially
out-dated tests being run. This change runs the tests from the current branch, allowing the code
and the tests to evolve together.

This also disables the default checkout of the master branch, which is unnecessary when calling
checkout() from the pipeline.
2019-05-15 16:44:29 -07:00
mprahl
dde4b96baf Add an integration test for buildrequiring a virtual stream 2019-05-15 13:47:32 -04:00
mprahl
14d0c30990 Add a try/catch around the grant-cg-access code in the integration tests
Since there's no way of knowing if the user has already been granted access,
this wraps this code and just ignores the failure.
2019-05-15 13:47:32 -04:00
Mike Bonnet
ee2ef77fe9 Fix grep to handle the new quoting style introduced in 66c3f821 2019-04-30 21:46:16 -07:00
Mike Bonnet
48778ba545 Grammar fixes 2019-04-30 15:27:28 -07:00
Mike Bonnet
5fffcfedd6 Remove unnecessary comment 2019-04-30 15:27:28 -07:00
Mike Bonnet
21a6f80e1a Split up long lines in openshift/integration/koji/README.md
Also a small typo.
2019-04-30 15:27:28 -07:00
Mike Bonnet
2c4298e678 read the DigiCert CA cert from a file rather than hard-coding it in the Jenkinsfile 2019-04-30 15:27:28 -07:00
Mike Bonnet
9c3d9bb441 MBS-Koji integration tests
This change introduces a set of Jenkins pipelines for building MBS
images and running integration tests against Koji using those images.
These pipelines are directly based on the WaiverDB pipeline work:

https://pagure.io/waiverdb/blob/master/f/openshift

The results of those tests are used to provide feedback to Pagure PRs
and to promote images through a series of environments, which may be
used to implement a continuous deployment process.

The current test cases, written in Groovy, are:
 - module-build-init: initate a module build and check that tags
   and targets in Koji are created correctly
 - module-build-cgimport: build an empty module and ensure that
   results are imported correctly into Koji, using the CGImport
   interface
2019-04-30 15:27:28 -07:00