resultsdb: Auto-deploy when new image is available
This commit is contained in:
parent
fca44a415d
commit
90ce359a71
3 changed files with 31 additions and 5 deletions
|
@ -87,6 +87,11 @@
|
||||||
template: backend/configmaps.yml
|
template: backend/configmaps.yml
|
||||||
objectname: backend-configmaps.yml
|
objectname: backend-configmaps.yml
|
||||||
|
|
||||||
|
- role: openshift/object
|
||||||
|
app: resultsdb
|
||||||
|
template: backend/imagestream.yml
|
||||||
|
objectname: backend-imagestream.yml
|
||||||
|
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: resultsdb
|
app: resultsdb
|
||||||
template: backend/deploymentconfigs.yml
|
template: backend/deploymentconfigs.yml
|
||||||
|
|
|
@ -48,11 +48,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: api
|
- name: api
|
||||||
{% if env == 'staging' %}
|
image: resultsdb-api
|
||||||
image: "{{ stg_resultsdb_image }}"
|
|
||||||
{% else %}
|
|
||||||
image: "{{ prod_resultsdb_image }}"
|
|
||||||
{% endif %}
|
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
env:
|
env:
|
||||||
- name: RESULTSDB_WSGI_SCRIPT_PATH
|
- name: RESULTSDB_WSGI_SCRIPT_PATH
|
||||||
|
@ -126,3 +122,11 @@ spec:
|
||||||
secretName: resultsdb-fedora-messaging-key
|
secretName: resultsdb-fedora-messaging-key
|
||||||
triggers:
|
triggers:
|
||||||
- type: ConfigChange
|
- type: ConfigChange
|
||||||
|
- type: ImageChange
|
||||||
|
imageChangeParams:
|
||||||
|
automatic: true
|
||||||
|
containerNames:
|
||||||
|
- api
|
||||||
|
from:
|
||||||
|
kind: ImageStreamTag
|
||||||
|
name: resultsdb-api:latest
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
apiVersion: image.openshift.io/v1
|
||||||
|
kind: ImageStream
|
||||||
|
metadata:
|
||||||
|
name: "resultsdb-api"
|
||||||
|
spec:
|
||||||
|
tags:
|
||||||
|
- name: latest
|
||||||
|
importPolicy:
|
||||||
|
scheduled: true
|
||||||
|
from:
|
||||||
|
kind: DockerImage
|
||||||
|
{% if env == 'staging' %}
|
||||||
|
name: "{{ stg_resultsdb_image }}"
|
||||||
|
{% else %}
|
||||||
|
name: "{{ prod_resultsdb_image }}"
|
||||||
|
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue