image-builder: Adding osbuild to koji builders

- configuring koji builders to use image builder
- configure koji hub to handle osbuild jobs
- Separate prod/stg koji builder osbuild plugin config

Signed-off-by: James Richardson <jamricha@redhat.com>
Signed-off-by: Emma Kidney <ekidney@redhat.com>
Signed-off-by: David Kirwan <dkirwan@redhat.com>
Signed-off-by: Stephen Coady <scoady@redhat.com>
This commit is contained in:
David Kirwan 2022-03-15 11:28:45 +00:00
parent 90e3b172dd
commit 9fbd26a83a
5 changed files with 45 additions and 2 deletions

View file

@ -0,0 +1,4 @@
koji_builder_client_secret_stg: "OVERRIDEME"
koji_builder_client_id_stg: "OVERRIDEME"
koji_builder_client_secret: "OVERRIDEME"
koji_builder_client_id: "OVERRIDEME"

View file

@ -124,6 +124,7 @@
- imagefactory-plugins-RHEVM
- pykickstart
- nosync
- koji-osbuild-builder
when: env == "staging"
tags:
- koji_builder
@ -174,6 +175,15 @@
- koji_builder
- rpmautospec
- name: build /etc/koji-osbuild/builder.conf
template: src=builder.conf.staging dest=/etc/koji-osbuild/builder.conf
notify:
- restart kojid
when: env == "staging"
tags:
- koji_builder
- koji_builder_osbuild
- name: build /etc/koji/koji.conf from group vars
template: src=koji.conf dest=/etc/koji.conf
tags:
@ -299,7 +309,7 @@
- removehttpd
- name: Add the Apache group
group: name=apache
group: name=apache
gid=48
system=yes
state=present
@ -309,7 +319,7 @@
- name: Create the apache user
user: name=apache
uid=48
uid=48
createhome=no
group=apache
home=/usr/share/httpd

View file

@ -0,0 +1,10 @@
[composer]
server = https://api.stage.openshift.com/
[composer:oauth]
client_id = "{{koji_builder_client_id_stg}}"
client_secret = "{{koji_builder_client_secret_stg}}"
token_url = https://identity.api.openshift.com/auth/realms/rhoas/protocol/openid-connect/token
[koji]
server = https://koji.stg.fedoraproject.org/kojihub

View file

@ -20,6 +20,21 @@
- packages
- koji_hub
#
# Setup koji hub osbuild plugin.
#
- name: install koji hub server packages
package: name={{ item }} state=present
when: env == "staging"
with_items:
- koji-osbuild
notify:
- restart kojira
tags:
- packages
- koji_hub
- koji_hub_osbuild
- name: install rhel7 koji hub server packages
package: name={{ item }} state=present
with_items:

View file

@ -84,7 +84,11 @@ MissingPolicyOk = False
#Plugins = koji-disable-builds-plugin
#Plugins = darkserver-plugin
{% if env="production" %}
Plugins = fedmsg-koji-plugin runroot_hub hub_containerbuild tag2distrepo sidetag_hub save_failed_tree
{% else %}
Plugins = osbuild fedmsg-koji-plugin runroot_hub hub_containerbuild tag2distrepo sidetag_hub save_failed_tree
{% endif %}
[policy]