Commit 372766dd authored by Yori Fournier's avatar Yori Fournier
Browse files

precise the deployment option with manifest.yaml

parent ab24e722
Pipeline #1934 passed with stages
in 45 seconds
......@@ -7,20 +7,21 @@ default:
stages:
- build
- deploy
variables:
OPENSHIFT_SERVER: https://${OPENSHIFT_IP}:${OPENSHIFT_PORT}/
OPENSHIFT_DOMAIN: apps.okd.aip.de
# Configure this variable in Secure Variables:
#OPENSHIFT_TOKEN:
#OPENSHIFT_PROJECT: python
#OPENSHIFT_TOKEN: see in OKD web interface (copy login cmd)
#OPENSHIFT_PROJECT: the name of the project
.login_to_okd: &login_to_okd
- oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN" --insecure-skip-tls-verify
- oc project "$CI_PROJECT_NAME-$CI_PROJECT_ID" 2> /dev/null || oc new-project "$CI_PROJECT_NAME-$CI_PROJECT_ID"
.build_image: &build_image
- oc new-build --strategy=docker --binary --name "build-$APP" --to "$APP"
- oc new-build --strategy=docker --binary --name "build-$APP" --to "image-$APP"
- oc start-build build-$APP --from-dir=./docker/$APP --follow
build-pgapp:
......@@ -55,3 +56,10 @@ build-wpdb:
- *login_to_okd
script:
- *build_image
deploy:
stage: deploy
before_script:
- *login_to_okd
script:
- oc apply -f manifest.yaml
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-wpdb
labels:
app: wpdb
spec:
replicas: 1
selector:
matchLabels:
app: wpdb
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
template:
metadata:
labels:
app: wpdb
spec:
containers:
- name: wpdb
image: docker-registry.default.svc:5000/daiquiri-test-instance-498/image-wpdb:latest
ports:
- containerPort: 5280
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