Build new websites buildconfig
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
60c13450de
commit
afaa6ef80e
5 changed files with 21 additions and 124 deletions
|
@ -11,15 +11,14 @@
|
|||
roles:
|
||||
- role: openshift/project
|
||||
app: websites
|
||||
description: Fedora websites
|
||||
description: Fedora websites building
|
||||
appowners:
|
||||
- codeblock
|
||||
- ryanlerch
|
||||
|
||||
- role: openshift/object
|
||||
- role: openshift/imagestream
|
||||
app: websites
|
||||
template: imagestream.yml
|
||||
objectname: imagestream.yml
|
||||
imagename: builder
|
||||
|
||||
- role: openshift/object
|
||||
app: websites
|
||||
|
@ -30,33 +29,3 @@
|
|||
app: websites
|
||||
buildname: websites-build
|
||||
objectname: websites-build
|
||||
|
||||
- role: openshift/object
|
||||
app: websites
|
||||
file: service.yml
|
||||
objectname: service.yml
|
||||
|
||||
- role: openshift/route
|
||||
app: websites
|
||||
routename: websites
|
||||
host: "stg.getfedora.org"
|
||||
serviceport: 8080-tcp
|
||||
servicename: websites
|
||||
when: env == "staging"
|
||||
|
||||
- role: openshift/route
|
||||
app: websites
|
||||
routename: websites
|
||||
host: "getfedora.org"
|
||||
serviceport: 8080-tcp
|
||||
servicename: websites
|
||||
when: env == "production"
|
||||
|
||||
- role: openshift/object
|
||||
app: websites
|
||||
file: deploymentconfig.yml
|
||||
objectname: deploymentconfig.yml
|
||||
|
||||
- role: openshift/rollout
|
||||
app: websites
|
||||
dcname: websites
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
name: websites
|
||||
labels:
|
||||
app: websites
|
||||
service: websites
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
app: websites
|
||||
service: websites
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: websites
|
||||
service: websites
|
||||
spec:
|
||||
containers:
|
||||
- name: websites
|
||||
image: registry/websites:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
readinessProbe:
|
||||
timeoutSeconds: 5
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: getfedora.org
|
||||
livenessProbe:
|
||||
timeoutSeconds: 5
|
||||
initialDelaySeconds: 60
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
httpHeaders:
|
||||
- name: Host
|
||||
value: getfedora.org
|
||||
resources:
|
||||
volumes:
|
||||
triggers:
|
||||
- type: ImageChange
|
||||
imageChangeParams:
|
||||
automatic: true
|
||||
containerNames:
|
||||
- "websites"
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: websites:latest
|
|
@ -1,16 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: websites
|
||||
name: websites
|
||||
spec:
|
||||
ports:
|
||||
- name: 8080-tcp
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: websites
|
||||
deploymentconfig: websites
|
||||
|
|
@ -6,27 +6,29 @@ metadata:
|
|||
environment: "websites"
|
||||
spec:
|
||||
source:
|
||||
git:
|
||||
uri: https://pagure.io/fedora-web/websites.git
|
||||
{% if env == 'staging' %}
|
||||
ref: "staging"
|
||||
{% else %}
|
||||
ref: "production"
|
||||
{% endif %}
|
||||
dockerfile: |-
|
||||
FROM fedora:latest
|
||||
RUN dnf -y install \
|
||||
python-flask \
|
||||
python-frozen-flask \
|
||||
python-flask-assets \
|
||||
python-rjsmin \
|
||||
python-cssmin \
|
||||
python-flask-babel \
|
||||
python-flask-htmlmin \
|
||||
python-cssutils \
|
||||
rubygem-sass \
|
||||
babel \
|
||||
python3-jinja2 \
|
||||
python-pyyaml \
|
||||
python-zanata-client && \
|
||||
dnf clean all
|
||||
CMD /etc/websites/build.sh
|
||||
strategy:
|
||||
type: Docker
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
{% if stg_websites_deploy_secret is defined and env == 'staging' %}
|
||||
- type: Generic
|
||||
generic:
|
||||
secret: "{{ stg_websites_deploy_secret }}"
|
||||
{% elif websites_deploy_secret is defined and env == 'production' %}
|
||||
- type: Generic
|
||||
generic:
|
||||
secret: "{{ websites_deploy_secret }}"
|
||||
{% endif %}
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: "websites"
|
Loading…
Add table
Add a link
Reference in a new issue