Commit 2ef97a62 authored by Yori Fournier's avatar Yori Fournier

reorganized ci

parent 852cf610
Pipeline #1950 failed with stages
in 10 seconds
...@@ -24,7 +24,7 @@ variables: ...@@ -24,7 +24,7 @@ variables:
- oc new-build --strategy=docker --binary --name "build-$APP" --to "image-$APP" --env-file="./docker/$APP/env" - oc new-build --strategy=docker --binary --name "build-$APP" --to "image-$APP" --env-file="./docker/$APP/env"
- oc start-build build-$APP --from-dir=./docker/$APP --follow - oc start-build build-$APP --from-dir=./docker/$APP --follow
build-pgapp: pgapp:build:
stage: build stage: build
variables: variables:
APP: pgapp APP: pgapp
...@@ -35,7 +35,7 @@ build-pgapp: ...@@ -35,7 +35,7 @@ build-pgapp:
script: script:
- *build_image - *build_image
build-pgdata: pgdata:build:
stage: build stage: build
variables: variables:
APP: pgdata APP: pgdata
...@@ -46,7 +46,7 @@ build-pgdata: ...@@ -46,7 +46,7 @@ build-pgdata:
script: script:
- *build_image - *build_image
build-wpdb: wpdb:build:
stage: build stage: build
variables: variables:
APP: wpdb APP: wpdb
...@@ -57,10 +57,34 @@ build-wpdb: ...@@ -57,10 +57,34 @@ build-wpdb:
script: script:
- *build_image - *build_image
deploy: pgapp:deploy:
stage: deploy stage: deploy
needs: ["pgapp:build"]
before_script: before_script:
- *login_to_okd - *login_to_okd
script: script:
- oc apply -f manifest.yaml - oc apply -f docker/pgapp/pgapp-deploy.yaml
pgdata:deploy:
stage: deploy
needs: ["pgdata:build"]
before_script:
- *login_to_okd
script:
- oc apply -f docker/pgdata/pgdata-deploy.yaml
wpdb:deploy:
stage: deploy
needs: ["wpdb:build"]
before_script:
- *login_to_okd
script:
- oc apply -f docker/wpdb/wpdb-deploy.yaml
#deploy:
# stage: deploy
# before_script:
# - *login_to_okd
# script:
# - oc apply -f manifest.yaml
# - oc new-app image-wpdb # this is working if one adds securityContext: runAsUser: 1000 in YAML file of deploymentConfig # - oc new-app image-wpdb # this is working if one adds securityContext: runAsUser: 1000 in YAML file of deploymentConfig
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-pgapp
labels:
app: pgapp
spec:
replicas: 1
selector:
matchLabels:
app: pgapp
template:
metadata:
labels:
app: pgapp
spec:
securityContext:
runAsUser: 1000
containers:
- name: pgapp
image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-pgapp:latest
ports:
- containerPort: 5282
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-pgdata
labels:
app: pgdata
spec:
replicas: 1
selector:
matchLabels:
app: pgdata
template:
metadata:
labels:
app: pgdata
spec:
securityContext:
runAsUser: 1000
containers:
- name: pgdata
image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-pgdata:latest
ports:
- containerPort: 5281
\ No newline at end of file
...@@ -30,51 +30,3 @@ spec: ...@@ -30,51 +30,3 @@ spec:
image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-wpdb:latest image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-wpdb:latest
ports: ports:
- containerPort: 5280 - containerPort: 5280
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-pgapp
labels:
app: pgapp
spec:
replicas: 1
selector:
matchLabels:
app: pgapp
template:
metadata:
labels:
app: pgapp
spec:
securityContext:
runAsUser: 1000
containers:
- name: pgapp
image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-pgapp:latest
ports:
- containerPort: 5282
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-pgdata
labels:
app: pgdata
spec:
replicas: 1
selector:
matchLabels:
app: pgdata
template:
metadata:
labels:
app: pgdata
spec:
securityContext:
runAsUser: 1000
containers:
- name: pgdata
image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-pgdata:latest
ports:
- containerPort: 5281
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment