mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
pass apiurl to source services (#234)
Some source services need to know the apiurl, e.g. to lookup values in the ~/.oscrc config file. Closes #234. https://github.com/openSUSE/osc/issues/234
This commit is contained in:
parent
b4d4d3c027
commit
8c45eb64ad
@ -297,6 +297,7 @@ class Serviceinfo:
|
||||
self.services.append(data)
|
||||
|
||||
def getProjectGlobalServices(self, apiurl, project, package):
|
||||
self.apiurl = apiurl
|
||||
# get all project wide services in one file, we don't store it yet
|
||||
u = makeurl(apiurl, ['source', project, package], query='cmd=getprojectservices')
|
||||
try:
|
||||
@ -392,6 +393,7 @@ class Serviceinfo:
|
||||
|
||||
# set environment when using OBS 2.3 or later
|
||||
if self.project != None:
|
||||
os.putenv("OBS_SERVICE_APIURL", self.apiurl)
|
||||
os.putenv("OBS_SERVICE_PROJECT", self.project)
|
||||
os.putenv("OBS_SERVICE_PACKAGE", self.package)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user