Commit 66213dde authored by Hogne Håskjold's avatar Hogne Håskjold
Browse files

Update to use gitlab-ci-helpers and update deprecated Deployment apiVersion

parent 5a03a012
Pipeline #22085 passed with stages
in 5 minutes and 14 seconds
image: registry.uninett.no/asm/kubernetes-deploy:v0.13 include:
- project: 'asm/gitlab-ci-helpers'
file: '/gitlab-ci-helpers.yml'
variables: variables:
KUBE_PROD_DOMAIN: dkim.paas2.uninett.no KUBE_PROD_DOMAIN: dkim.paas2.uninett.no
...@@ -14,57 +16,31 @@ stages: ...@@ -14,57 +16,31 @@ stages:
- production - production
build: build:
extends: .docker-build
stage: build stage: build
script:
- build
only: only:
- branches - branches
production: production:
extends: .production
stage: production stage: production
variables: variables:
REPLICAS: "2" REPLICAS: "2"
script: script:
- deploy dist/kubernetes.yml - deploy dist/kubernetes.yml
environment:
name: production
url: https://$KUBE_PROD_DOMAIN
when: manual
only:
- master
staging: staging:
extends: .staging
stage: staging stage: staging
script: script:
- deploy dist/kubernetes.yml - deploy dist/kubernetes.yml
environment:
name: staging
url: https://$KUBE_TEST_ID-staging.paas2.uninett.no
only:
- master
review: review:
extends: .review
stage: review stage: review
script: script:
- deploy dist/kubernetes.yml - 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: stop_review:
extends: .stop_review
stage: review stage: review
script:
- destroy
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
when: manual
only:
- branches
except:
- master
apiVersion: extensions/v1beta1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: $CI_ENVIRONMENT_SLUG name: $CI_ENVIRONMENT_SLUG
...@@ -9,6 +9,9 @@ metadata: ...@@ -9,6 +9,9 @@ metadata:
build_id: "$CI_BUILD_ID" build_id: "$CI_BUILD_ID"
spec: spec:
replicas: $REPLICAS replicas: $REPLICAS
selector:
matchLabels:
app: $CI_ENVIRONMENT_SLUG
template: template:
metadata: metadata:
labels: labels:
......
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