mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
whatcanidoforfedora: use staging/production branch to trigger build in openshift
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
- role: openshift/object
|
||||
app: asknot
|
||||
file: buildconfig.yml
|
||||
template: buildconfig.yml
|
||||
objectname: buildconfig.yml
|
||||
|
||||
- role: openshift/start-build
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
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
|
||||
33
roles/openshift-apps/asknot/templates/buildconfig.yml
Normal file
33
roles/openshift-apps/asknot/templates/buildconfig.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
name: asknot-build
|
||||
labels:
|
||||
environment: "asknot"
|
||||
spec:
|
||||
source:
|
||||
git:
|
||||
uri: https://github.com/fedora-infra/asknot-ng.git
|
||||
{% if env == 'staging' %}
|
||||
ref: "staging"
|
||||
{% else %}
|
||||
ref: "production"
|
||||
{% endif %}
|
||||
strategy:
|
||||
type: Docker
|
||||
triggers:
|
||||
{% if stg_asknot_github_secret is defined and env == 'staging' %}
|
||||
- type: GitHub
|
||||
github:
|
||||
secret: "{{ stg_asknot_github_secret }}"
|
||||
{% elif asknot_github_secret is defined and env == 'production' %}
|
||||
- type: GitHub
|
||||
github:
|
||||
secret: "{{ asknot_github_secret }}"
|
||||
{% endif %}
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: asknot:latest
|
||||
Reference in New Issue
Block a user