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:
|
roles:
|
||||||
- role: openshift/project
|
- role: openshift/project
|
||||||
app: websites
|
app: websites
|
||||||
description: Fedora websites
|
description: Fedora websites building
|
||||||
appowners:
|
appowners:
|
||||||
- codeblock
|
- codeblock
|
||||||
- ryanlerch
|
- ryanlerch
|
||||||
|
|
||||||
- role: openshift/object
|
- role: openshift/imagestream
|
||||||
app: websites
|
app: websites
|
||||||
template: imagestream.yml
|
imagename: builder
|
||||||
objectname: imagestream.yml
|
|
||||||
|
|
||||||
- role: openshift/object
|
- role: openshift/object
|
||||||
app: websites
|
app: websites
|
||||||
|
@ -30,33 +29,3 @@
|
||||||
app: websites
|
app: websites
|
||||||
buildname: websites-build
|
buildname: websites-build
|
||||||
objectname: 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"
|
environment: "websites"
|
||||||
spec:
|
spec:
|
||||||
source:
|
source:
|
||||||
git:
|
dockerfile: |-
|
||||||
uri: https://pagure.io/fedora-web/websites.git
|
FROM fedora:latest
|
||||||
{% if env == 'staging' %}
|
RUN dnf -y install \
|
||||||
ref: "staging"
|
python-flask \
|
||||||
{% else %}
|
python-frozen-flask \
|
||||||
ref: "production"
|
python-flask-assets \
|
||||||
{% endif %}
|
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:
|
strategy:
|
||||||
type: Docker
|
type: Docker
|
||||||
triggers:
|
triggers:
|
||||||
- type: ConfigChange
|
- type: ConfigChange
|
||||||
- type: ImageChange
|
- 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:
|
output:
|
||||||
to:
|
to:
|
||||||
kind: ImageStreamTag
|
kind: ImageStreamTag
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: ImageStream
|
|
||||||
metadata:
|
|
||||||
name: "websites"
|
|
Loading…
Add table
Add a link
Reference in a new issue