summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_kaas/templates/40-kaas-app-builders.yml.j2')
-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 }}"