Commit ee546eb6 authored by Jørn Åne de Jong's avatar Jørn Åne de Jong

Try to get it to build on local Kubernetes infrastructure

parent 92b015c2
Pipeline #6234 passed with stages
in 4 minutes and 7 seconds
image: registry.uninett.no/asm/kubernetes-deploy:v0.13
variables:
KUBE_PROD_DOMAIN: dkim.paas2.uninett.no
KUBE_TEST_ID: dkim
HTTP_PORT: '80' # The port number of the web server.
REPLICAS: '1'
stages:
- build
- test
- review
- staging
- production
build:
stage: build
script:
- build
only:
- branches
production:
stage: production
variables:
REPLICAS: "2"
script:
- deploy dist/kubernetes.yml
environment:
name: production
url: https://$KUBE_PROD_DOMAIN
when: manual
only:
- master
staging:
stage: staging
script:
- deploy dist/kubernetes.yml
environment:
name: staging
url: https://$KUBE_TEST_ID-staging.paas2.uninett.no
only:
- master
review:
stage: review
script:
- deploy dist/kubernetes.yml
environment:
name: review/$CI_BUILD_REF_NAME
url: https://$KUBE_TEST_ID-$CI_ENVIRONMENT_SLUG.paas2.uninett.no
on_stop: stop_review
only:
- branches
except:
- master
stop_review:
stage: review
script:
- destroy
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
when: manual
only:
- branches
except:
- master
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: $CI_ENVIRONMENT_SLUG
namespace: $KUBE_NAMESPACE
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline_id: "$CI_PIPELINE_ID"
build_id: "$CI_BUILD_ID"
spec:
replicas: $REPLICAS
template:
metadata:
labels:
name: $CI_ENVIRONMENT_SLUG
app: $CI_ENVIRONMENT_SLUG
spec:
containers:
- name: app
image: $CI_REGISTRY_IMAGE:$CI_REGISTRY_TAG
ports:
- name: web
containerPort: $HTTP_PORT
livenessProbe:
httpGet:
path: /
port: $HTTP_PORT
initialDelaySeconds: 15
timeoutSeconds: 15
readinessProbe:
httpGet:
path: /
port: $HTTP_PORT
initialDelaySeconds: 5
timeoutSeconds: 15
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