summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-08-22 10:31:26 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-08-22 10:31:26 +0200
commitfcc988835ce49dee4ce376565a9f643a165de74e (patch)
tree96459aa091285446453d100728bc01a4d465162c /roles
parentcf60089e1302f016cf38b8dd9c25d1c296bd4647 (diff)
downloadands-fcc988835ce49dee4ce376565a9f643a165de74e.tar.gz
ands-fcc988835ce49dee4ce376565a9f643a165de74e.tar.bz2
ands-fcc988835ce49dee4ce376565a9f643a165de74e.tar.xz
ands-fcc988835ce49dee4ce376565a9f643a165de74e.zip
Support building multiple versions per imagestream
Diffstat (limited to 'roles')
-rw-r--r--roles/ands_kaas/templates/40-kaas-app-builders.yml.j211
1 files changed, 10 insertions, 1 deletions
diff --git a/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2 b/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2
index d033eda..50bef9a 100644
--- a/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2
+++ b/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2
@@ -16,17 +16,26 @@ objects:
{% for name, builder in builders.iteritems() %}
{% set isname = builder.name | default(name) | regex_replace('_','-') %}
{% set istag = builder.version | default("latest") %}
+ {% set bcname = isname if istag == 'latest' else isname + '-' + istag %}
{% set type = builder.type | default("Docker") %}
{% set src_type = builder.src_type | default("git") %}
{% set image_type = builder.image_type | default("ImageStreamTag") %}
+ {% if builder.name is not defined or builder.name == name %}
- kind: ImageStream
apiVersion: v1
metadata:
name: {{ isname }}
+ labels:
+ app: {{ appname | default(kaas_project) }}
+ name: {{ isname }}
+ {% endif %}
- kind: "BuildConfig"
apiVersion: v1
metadata:
- name: {{ isname }}
+ name: {{ bcname }}
+ labels:
+ app: {{ appname | default(kaas_project) }}
+ name: {{ isname }}
spec:
successfulBuildsHistoryLimit: "{{ kaas_pod_history_limit }}"
failedBuildsHistoryLimit: "{{ kaas_pod_history_limit }}"