summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-jjb-renderer.py
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2016-09-19 12:08:52 -0700
committerTim Rozet <trozet@redhat.com>2017-05-10 16:46:26 -0400
commitc33a4a96473acc713d9c4c4228de93d4617c58b4 (patch)
tree98f0ed7b2de2fc7df554837c78a74bced10ff87c /jjb/apex/apex-jjb-renderer.py
parent3239c88f1f6a7fbc7394b6dba72fb697b12608a2 (diff)
Allow Asynchronous Apex Builds
- Remove any build blockers on 'apex-build-*' jobs. - Adds script to download latest build artifacts before deployment. - Make each deploy download the needed artifacts before running. - ARTIFACT_VERSION now set to dev for verify builds to indicate tarball should be uploaded to artifacts repo - apex.yml jjb is now generated by using apex-jjb-renderer - scenarios are managed in scenarios.yaml JIRA: APEX-328 Change-Id: I4a51565686bd2011a310c3926d8260cd4641dca5 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'jjb/apex/apex-jjb-renderer.py')
-rw-r--r--jjb/apex/apex-jjb-renderer.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/jjb/apex/apex-jjb-renderer.py b/jjb/apex/apex-jjb-renderer.py
new file mode 100644
index 000000000..da62bc7ad
--- /dev/null
+++ b/jjb/apex/apex-jjb-renderer.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2016 Tim Rozet (trozet@redhat.com) and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import pprint
+import yaml
+from jinja2 import Environment
+from jinja2 import FileSystemLoader
+
+gspathname = dict()
+branch = dict()
+env = Environment(loader=FileSystemLoader('./'), autoescape=True)
+
+with open('scenarios.yaml.hidden') as _:
+ scenarios = yaml.safe_load(_)
+
+template = env.get_template('apex.yml.j2')
+
+print("Scenarios are: ")
+pprint.pprint(scenarios)
+
+for stream in scenarios:
+ if stream == 'master':
+ gspathname['master'] = ''
+ branch[stream] = stream
+ else:
+ gspathname[stream] = '/' + stream
+ branch[stream] = 'stable/' + stream
+
+output = template.render(scenarios=scenarios, gspathname=gspathname,
+ branch=branch)
+
+with open('./apex.yml', 'w') as fh:
+ fh.write(output)