diff --git a/playbooks/openshift-apps/asknot.yml b/playbooks/openshift-apps/asknot.yml index 689d34ec13..85965fd08d 100644 --- a/playbooks/openshift-apps/asknot.yml +++ b/playbooks/openshift-apps/asknot.yml @@ -20,6 +20,16 @@ template: imagestream.yml objectname: imagestream.yml + - role: openshift/object + app: asknot + template: buildconfig.yml + objectname: buildconfig.yml + + - role: openshift/start-build + app: asknot + buildname: asknot-build + objectname: asknot-build + - role: openshift/object app: asknot file: service.yml diff --git a/roles/openshift-apps/asknot/files/buildconfig.yml b/roles/openshift-apps/asknot/files/buildconfig.yml new file mode 100644 index 0000000000..cd696d9787 --- /dev/null +++ b/roles/openshift-apps/asknot/files/buildconfig.yml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: BuildConfig +metadata: + name: asknot-build + labels: + environment: "asknot" +spec: + source: + git: + uri: https://github.com/fedora-infra/asknot-ng.git + ref: "os-staging" + strategy: + type: Docker + triggers: + - type: ImageChange + output: + to: + kind: ImageStreamTag + name: asknot:latest diff --git a/roles/openshift-apps/asknot/templates/imagestream.yml b/roles/openshift-apps/asknot/templates/imagestream.yml index 4a87090ceb..5509dedd0f 100644 --- a/roles/openshift-apps/asknot/templates/imagestream.yml +++ b/roles/openshift-apps/asknot/templates/imagestream.yml @@ -2,16 +2,3 @@ apiVersion: v1 kind: ImageStream metadata: name: "asknot" -spec: - tags: - - name: latest - importPolicy: - scheduled: true - from: - kind: DockerImage -{% if env == 'staging' %} - name: quay.io/fedora-infra/asknot:os-staging -{% else %} - # This is 'prod' tag is maintained by hand. - name: quay.io/fedora-infra/asknot:os-prod -{% endif %}