[PATCH] Add a role to deploy buildconfig instead of using openshift/object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Michael Scherer <misc@xxxxxxxx>
---
 roles/openshift/buildconfig/tasks/main.yml         |  7 ++++
 .../buildconfig/templates/buildconfig.yml          | 42 ++++++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 roles/openshift/buildconfig/tasks/main.yml
 create mode 100644 roles/openshift/buildconfig/templates/buildconfig.yml

diff --git a/roles/openshift/buildconfig/tasks/main.yml b/roles/openshift/buildconfig/tasks/main.yml
new file mode 100644
index 0000000..7b5ac89
--- /dev/null
+++ b/roles/openshift/buildconfig/tasks/main.yml
@@ -0,0 +1,7 @@
+---
+- name: buildconfig-{{buildconfigname}}.yml
+  include_role:
+    name: openshift/object
+  vars:
+    objectname: buildconfig-{{buildconfigname}}.yml
+    template_fullpath: "{{roles_path}}/openshift/buildconfig/templates/buildconfig.yml"
diff --git a/roles/openshift/buildconfig/templates/buildconfig.yml b/roles/openshift/buildconfig/templates/buildconfig.yml
new file mode 100644
index 0000000..c1fa155
--- /dev/null
+++ b/roles/openshift/buildconfig/templates/buildconfig.yml
@@ -0,0 +1,42 @@
+apiVersion: v1
+kind: BuildConfig
+metadata:
+  name: {{ buildconfigname }}
+  labels:
+    environment: {{ app }}
+spec:
+  completionDeadlineSeconds: 1800
+  output:
+    to:
+      kind: ImageStreamTag
+      name: {{ app }}:latest
+  source:
+{% if git_url is defined %}
+    type: Git
+    git:
+      uri: {{ git_url }}
+{% else %}
+    type: Dockerfile
+    dockerfile: |-
+        {{ dockerfile | indent(8) }}
+{% endif %}
+  strategy:
+{% if git_url is defined %}
+    type: Source
+    sourceStrategy:
+      from:
+        kind: ImageStreamTag
+        name: {{ s2i_image }}:latest
+{% else %}
+    type: Docker
+    dockerStrategy:
+      noCache: false
+{% endif %}
+  triggers:
+{% if github_secret is defined %}
+  - type: GitHub
+    github:
+      secret: "{{ github_secret }}"
+{% endif %}
+  - type: ConfigChange
+  - type: ImageChange
-- 
1.8.3.1
_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux