Skip to content

Commit 88b6868

Browse files
committed
✨(build) add support for BCs + ISs objects
Until now, BuildConfiguration and ImageStream objects were not required. Now that we need to add APM and customize images on a per-client basis, using the aforementionned objects seems the more relevant solution.
1 parent c52ed36 commit 88b6868

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

tasks/get_objects_for_app.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
# Get objects for an application
32

43
- name: Set templates list for this app
@@ -8,17 +7,29 @@
87

98
- name: Set OpenShift objects to manage
109
set_fact:
10+
builds: "{{ templates | map('regex_search', '.*/bc.*\\.yml\\.j2$') | select('string') | list }}"
1111
deployments: "{{ templates | map('regex_search', '.*/dc.*\\.yml\\.j2$') | select('string') | list }}"
1212
services: "{{ templates | map('regex_search', '.*/svc\\.yml\\.j2$') | select('string') | list }}"
13+
streams: "{{ templates | map('regex_search', '.*/is.*\\.yml\\.j2$') | select('string') | list }}"
1314
jobs: "{{ templates | map('regex_search', '.*/job_.*\\.yml\\.j2$') | select('string') | list }}"
1415
routes: "{{ templates | map('regex_search', '.*/route.*\\.yml\\.j2$') | select('string') | list }}"
1516
tags:
1617
- deploy
18+
- build
1719
- deployment
1820
- service
21+
- stream
1922
- job
2023
- route
2124

25+
- name: Display OpenShift's builds for this app
26+
debug:
27+
msg: "{{ builds | to_nice_yaml}}"
28+
when: builds
29+
tags:
30+
- deploy
31+
- build
32+
2233
- name: Display OpenShift's deployments for this app
2334
debug:
2435
msg: "{{ deployments | to_nice_yaml}}"
@@ -35,6 +46,14 @@
3546
- deploy
3647
- service
3748

49+
- name: Display OpenShift's image streams for this app
50+
debug:
51+
msg: "{{ streams | to_nice_yaml }}"
52+
when: services
53+
tags:
54+
- deploy
55+
- stream
56+
3857
- name: Display OpenShift's jobs for this app
3958
debug:
4059
msg: "{{ jobs | to_nice_yaml }}"

tasks/manage_app.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
# Task set to manage apps
32
#
43
# Args:
@@ -12,12 +11,16 @@
1211
definition: "{{ lookup('template', item) | from_yaml }}"
1312
state: "{{ deployment_state | default('present') }}"
1413
with_items:
14+
- "{{ builds }}"
15+
- "{{ streams }}"
1516
- "{{ deployments }}"
1617
- "{{ services }}"
1718
tags:
1819
- deploy
20+
- build
1921
- deployment
2022
- service
23+
- stream
2124

2225
- name: Wait for pods to be running
2326
debug:

0 commit comments

Comments
 (0)