handle osbs custom build config for openshift 3.4.0+
Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
d8046f78f9
commit
ede16377d8
3 changed files with 38 additions and 0 deletions
|
@ -315,6 +315,13 @@
|
|||
when: env == "production"
|
||||
}
|
||||
|
||||
tasks:
|
||||
- name: set custom build policy for koji builder in openshift for osbs
|
||||
shell: "oadm policy add-role-to-user -n default osbs-custom-build {{ osbs_koji_prod_username }} && touch /etc/origin/koji-custom-build-policy-added"
|
||||
args:
|
||||
creates: "/etc/origin/koji-builder-policy-added"
|
||||
when: env == "production"
|
||||
|
||||
- name: Manage docker images and image stream
|
||||
hosts: osbs-masters[0]
|
||||
tags:
|
||||
|
|
|
@ -113,6 +113,27 @@
|
|||
tags:
|
||||
- limitranges
|
||||
|
||||
# Setup custom build role
|
||||
- name: copy custom build role
|
||||
template:
|
||||
src: role-osbs-custom-build.yml.j2
|
||||
dest: "{{ osbs_openshift_home }}/{{ inventory_hostname }}-{{ osbs_namespace }}-role-osbs-custom-build.yml"
|
||||
environment: "{{ osbs_environment }}"
|
||||
register: yaml_role
|
||||
tags:
|
||||
- oc
|
||||
|
||||
- name: import custom build role
|
||||
command: >
|
||||
oc replace
|
||||
--namespace={{ osbs_namespace }}
|
||||
--force=true
|
||||
--filename={{ osbs_openshift_home }}/{{ inventory_hostname }}-{{ osbs_namespace }}-role-osbs-custom-build.yml
|
||||
environment: "{{ osbs_environment }}"
|
||||
when: yaml_role.changed
|
||||
tags:
|
||||
- oc
|
||||
|
||||
- include: yum_proxy.yml
|
||||
when: osbs_yum_proxy_image is defined
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
apiVersion: v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: osbs-custom-build
|
||||
namespace: {{ osbs_namespace }}
|
||||
rules:
|
||||
- verbs:
|
||||
- create
|
||||
resources:
|
||||
- builds/custom
|
Loading…
Add table
Add a link
Reference in a new issue