Commit Graph

60 Commits

Author SHA1 Message Date
Brendan Reilly
543e2a013f Match dockerfile deps with Fedora requirements 2022-12-20 11:44:47 -05:00
Brendan Reilly
60692b0c6a Fix C3I tests 2022-12-15 10:19:35 -05:00
Mike Bonnet
ecf7da7aa3 install mbs in the container images using pip
Removing the requirement to build the rpm as part of the image build simplifies the
build process and reduces fragility introduced by trying to keep the rpm build and
image builds in sync.
2022-08-24 12:03:08 -07:00
Brendan Reilly
4a30847bea Remove Greenwave Code
No implementations of MBS are using Greenwave, and there are no current plans
to do so. Koji Resolver will be sufficient for any usecase dependent on gating.
2022-03-30 14:27:34 -04:00
Mike McLean
8ba7bdd6d8 update ci spec file url
https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main
2021-04-21 16:23:08 -04:00
Michal Kovarik
5b770dfbf5 C3I: switch koji auth from ssl to kerberos
New pipeline-as-a-service Koji is going to use Kerberos instead SSL.
Added dist-git to services since new koji worker in
pipeline-as-a-service is integrated with dist-git.
Changing package_manager from dnf to yum which is configured in koji
from pipeline-as-a-service.
2020-06-17 08:26:33 +02:00
Michal Kovarik
c80a361717 C3I role integration with MBS3
Use unified role for C3I workflows - https://pagure.io/c3i-library/blob/master/f/roles/c3i
2020-04-30 07:18:34 +00:00
mprahl
daf29dd93c Move some of the defaults from conf/config.py to module_build_service/config.py
This removes the need to duplicate these configuration values.
2020-03-03 14:48:47 -05:00
Michal Kovarik
7bae720b81 C3I: Fix permissions on new c3i project.
Allow service account used by pipeline-as-a-service to manage resources
in project created via c3i-as-a-service.
2020-02-14 07:21:38 +01:00
Mike Bonnet
762cc5cfd6 typo in integration tests
Missing comma.
2020-02-06 11:43:13 -08:00
Michal Kovarik
07806dba2c C3I: Use new SERVICES_TO_DEPLOY parameter
Allows to whitelist services to be installed.
2020-02-06 01:14:44 +00:00
Michal Kovarik
de9443a74a C3I: Rewrite test into bash to be re-usable
Move execution logic from groovy scripts to bash. To be possible to run
them from any environment.
Setup pipeline using provion endpoint.
2020-01-23 07:32:03 +01:00
Michal Kovarik
a97f6ce9ff Use jinja templates to provide 'full-jobs'
Reduce number of jobs from 20 to 12 by merging them and using
templating to avoid code duplicity.
Jenkinsfile are directly put into jobs as a script - not pulled from
repository - avoiding issue with not clean workspace.
Secrets are taken from openshift using service account intead of
refering them in environment which caused that secret had to exist and
could be empty.
Job execution is straitforward - one jobs is repsonsible for each
process, only triggered jobs are c3iaas request and
pipeline-as-a-service job, everything else is managed by one job.
2019-12-11 12:30:59 +01:00
Michal Kovarik
0f057696c8 update tests 2019-12-03 10:15:11 +01:00
Michal Kovarik
e40f5b9735 Integrate pipeline-as-a-code for build 2019-12-03 10:14:20 +01:00
Michal Kovarik
8ba97efce7 Move pagure functions to c3i-library 2019-12-03 07:31:28 +01:00
Mike Bonnet
86c85825ee update container base images to Fedora 31
Also update the uid management in the frontend image to be more consistent with
best practices, as demonstrated by:

https://github.com/RHsyseng/container-rhel-examples/tree/master/starter-arbitrary-uid

This allows the dependency on nss_wrapper to be dropped.
2019-11-01 12:04:36 -07:00
Mike Bonnet
f6baf5a427 convert tests to Kerberos auth 2019-10-29 19:37:31 -07:00
Mike Bonnet
6cdf460647 configure MBS to use Kerberos for authentication
This change deploys a KDC using the c3i-library (https://pagure.io/c3i-library) and configures MBS
to require Kerberos authentication for submitting builds to the frontend.
2019-10-29 19:37:31 -07:00
Luiz Carvalho
246cae6328 Use the new internal container registry
Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
2019-10-23 17:49:19 -04:00
Mike Bonnet
6868454fcc increase build timeouts 2019-10-18 10:29:29 -07:00
Mike Bonnet
78ee32bc83 enable parallel job execution
With the use of C3IaaS, resource contention in the main OpenShift project will
be dramatically reduced. This allows jobs to run in paralle, increasing throughput
and reducing lag time for feedback on changes.
2019-10-17 07:32:16 -07:00
Mike Bonnet
f86b736c70 use C3I-as-a-Service to allocate a dynamic project for building and testing
The C3I-as-a-Service system (https://pagure.io/c3i-library/blob/master/f/c3iaas)
enables creation of new OpenShift projects, which will be deleted after a
configurable period of time, and are suitable for building and testing proposed
changes. The MBS-Koji integration tests now make use of C3IaaS, to reduce resource
contention and avoid false failures due to quota limitations.
2019-10-17 07:32:16 -07:00
mprahl
86b16d61c0 Unpin python3-libmodulemd in the C3I tests since the MBS RPM requires it directly 2019-09-13 09:12:34 -04:00
mprahl
10d70f51e1 Install python3-pytest-cov in the C3I Dockerfile since it's now used by tox 2019-09-13 09:12:24 -04:00
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
mprahl
c1e2a5b0af Unpin the libmodulemd RPMs 2019-05-16 11:51:38 +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
mprahl
0d96b1ffd3 Pin the RPMs for libmodulemd v2 in the Jenkins job 2019-05-13 22:26:07 -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
5594d7e2a4 Explain what run-httpd is doing 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
c369bc416c use CMD instead of ENTRYPOINT 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
Merlin Mathesius
dd950857ec Update koji tagging for scratch modules.
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2019-03-01 10:27:04 -06:00
Matt Prahl
290f19d477 Merge #1076 Update the README for OpenShift deployments 2018-11-13 17:24:22 +00:00
Hunor Csomortáni
8ec8a01006 Rename 'koji_arches' to 'arches' in OpenShift config
'koji_arches' was renamed to 'arches' in a previous commit. Update the
configuration in the OpenShift template accordingly.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2018-11-13 15:10:32 +01:00