plugins/builder: make urls configurable
Can't really hardcode those.
This commit is contained in:
parent
5eeb251882
commit
d31cadd304
1 changed files with 14 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
import configparser
|
||||
import enum
|
||||
import json
|
||||
import sys
|
||||
|
|
@ -156,8 +157,19 @@ class OSBuildImage(BaseTaskHandler):
|
|||
def __init__(self, task_id, method, params, session, options):
|
||||
super().__init__(task_id, method, params, session, options)
|
||||
|
||||
self.composer_url = "http://composer:8701/"
|
||||
self.koji_url = "https://localhost/kojihub"
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg.read_dict({
|
||||
"composer": {"url": "http://localhost:8701/"},
|
||||
"koji": {"url": "https://localhost/kojihub"}
|
||||
})
|
||||
|
||||
cfg.read([
|
||||
"/usr/share/osbuild-composer/koji.conf",
|
||||
"/etc/osbuild-composer/koji.conf"
|
||||
])
|
||||
|
||||
self.composer_url = cfg["composer"]["url"]
|
||||
self.koji_url = cfg["koji"]["url"]
|
||||
self.client = Client(self.composer_url)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue