diff --git a/roles/openshift-apps/koschei/templates/backend-config.yml b/roles/openshift-apps/koschei/templates/backend-config.yml index 07f90010ba..f293097341 100644 --- a/roles/openshift-apps/koschei/templates/backend-config.yml +++ b/roles/openshift-apps/koschei/templates/backend-config.yml @@ -7,6 +7,8 @@ stringData: {{ lookup('template', roles_path + '/openshift-apps/koschei/templates/config-backend.cfg.j2') | indent }} fedora-messaging.toml: | {{ lookup('template', roles_path + '/openshift-apps/koschei/templates/fedora-messaging.toml.j2') | indent }} + copr-config: | + {{ lookup('template', roles_path + '/openshift-apps/koschei/templates/copr-config.j2') | indent }} krb5.conf: | {{ lookup('template', roles_path + '/base/templates/krb5.conf.j2') | indent }} data: diff --git a/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 b/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 index c12dc40b2c..2b521b9b13 100644 --- a/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-backend.cfg.j2 @@ -89,7 +89,7 @@ config = { }, }, {% if env == 'staging' %} - "plugins": ['fedmsg', 'osci'], + "plugins": ['fedmsg', 'osci', 'copr'], {% else %} "plugins": ['fedmsg'], {% endif %} @@ -121,6 +121,32 @@ config = { "namespace": "koschei", }, }, + {% if env == 'staging' %} + "copr": { + "frontend_url": "https://copr.stg.fedorainfracloud.org/", + "build_log_url": "https://download.copr-dev.fedorainfracloud.org/results/" + "{copr_owner}/{copr_name}/{copr_chroot}/" + "{build_id:08d}-{package_name}/build.log.gz", + "copr_owner": "koschei", + "chroot_name": "custom-1-x86_64", + "config_path": "/etc/koschei/copr-config", + "overriding_by_exclusions": True, + "max_builds": 2, + "fedmsg_topic": "org.fedoraproject.{{ fedmsg_env }}.copr.build.end", + "default_schedule_count": 8, + "name_prefix": "k", + "require_admin": True, + "description": """ + This Copr project was created automatically by Koschei as part + of rebuild request {request_id}. To find more information + about this project, see Koschei documentation. + """, + "instructions": """ + This Copr project is used internally by Koschei and its + contents are not meant to be installed by users. + """, + }, + {% endif %} "caching": { "rpm_requires": { "backend": "dogpile.cache.memcached", diff --git a/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 b/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 index f998b882f3..3b112a8b7a 100644 --- a/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 +++ b/roles/openshift-apps/koschei/templates/config-frontend.cfg.j2 @@ -44,7 +44,7 @@ config = { }, }, {% if env == 'staging' %} - "plugins": [], + "plugins": ['copr'], {% else %} "plugins": ['pagure'], {% endif %} diff --git a/roles/openshift-apps/koschei/templates/copr-config.j2 b/roles/openshift-apps/koschei/templates/copr-config.j2 new file mode 100644 index 0000000000..e6b916da5b --- /dev/null +++ b/roles/openshift-apps/koschei/templates/copr-config.j2 @@ -0,0 +1,5 @@ +[copr-cli] +login = {{ koschei_copr_login }} +username = {{ koschei_copr_username }} +token = {{ koschei_copr_token }} +copr_url = {{ koschei_copr_url }} diff --git a/roles/openshift-apps/koschei/vars/production.yml b/roles/openshift-apps/koschei/vars/production.yml index 20dcb8d51b..dcf46fdaf2 100644 --- a/roles/openshift-apps/koschei/vars/production.yml +++ b/roles/openshift-apps/koschei/vars/production.yml @@ -11,6 +11,11 @@ koschei_koji_web: koji.fedoraproject.org koschei_oidc_provider: id.fedoraproject.org koschei_bugzilla: bugzilla.redhat.com +koschei_copr_url: https://copr.fedoraproject.org +koschei_copr_username: koschei +koschei_copr_login: "" +koschei_copr_token: "" + koschei_pgsql_username: koscheiuser koschei_pgsql_password: "{{ koscheiuser_db_password }}" koschei_pgsql_admin_username: koscheiadmin diff --git a/roles/openshift-apps/koschei/vars/staging.yml b/roles/openshift-apps/koschei/vars/staging.yml index 8311ee5b76..79aae7d903 100644 --- a/roles/openshift-apps/koschei/vars/staging.yml +++ b/roles/openshift-apps/koschei/vars/staging.yml @@ -11,6 +11,11 @@ koschei_koji_web: koji.stg.fedoraproject.org koschei_oidc_provider: id.stg.fedoraproject.org koschei_bugzilla: bugzilla5.redhat.com +koschei_copr_url: https://copr.stg.fedoraproject.org +koschei_copr_username: koschei +koschei_copr_login: "{{ koschei_copr_login_stg }}" +koschei_copr_token: "{{ koschei_copr_token_stg }}" + koschei_pgsql_username: koscheiuser koschei_pgsql_password: "{{ koscheiuser_stg_db_password }}" koschei_pgsql_admin_username: koscheiadmin @@ -27,6 +32,7 @@ koschei_backend_services: - { name: build-resolver, cpu: [ 1000, 1500 ], memory: [ 1024, 4096 ] } - { name: repo-resolver, cpu: [ 2000, 8000 ], memory: [ 1024, 4096 ] } - { name: watcher, cpu: [ 1000, 1500 ], memory: [ 256, 512 ] } + - { name: copr-resolver, cpu: [ 1000, 1500 ], memory: [ 1024, 4096 ] } koschei_cron_jobs: - name: db-cleanup