import sys
import re
import shutil
+import base64
from common.buildtrigger import trigger_info, trigger_next
from common.buildservice import BuildService
from common.prerelease import get_prerelease_project_name
from common.prerelease import get_info_from_prerelease_project_name
from common.snapshot import Snapshot, SnapshotError
+from common.iris_rest_client import IrisRestClient
class LocalError(Exception):
"""Local error exception."""
'repo': repo_name,
'url_pub_base': url_pub_base
}
+ # add image_building for iris
+ pub_enabled = os.getenv("IRIS_PUB_ENABLED", "0") != "0"
+ if pub_enabled:
+ rest = IrisRestClient(
+ os.getenv("IRIS_SERVER"),
+ os.getenv("IRIS_USERNAME"),
+ base64.b64decode(os.getenv('IRIS_PASSWORDX','')))
+ rest.publish_event("image_building", {
+ "project": project,
+ "repo": repo_name,
+ "name": name,
+ })
trigger_next('%s/image_trigger_%s_%s' % (os.getenv('WORKSPACE'),
repo_name, index), data)