.gitlab-ci.yml 743 Bytes
Newer Older
1
image: registry.uninett.no/asm/kubernetes-deploy:v0.19
Jørn Åne de Jong's avatar
Jørn Åne de Jong committed
2
3
4
5
6
7
8
9
10
11
12

variables:
  HTTP_PORT: '80' # The port number of the web server.
  REPLICAS: '2'

stages:
  - build
  - staging
  - production

build:
Jørn Åne de Jong's avatar
Jørn Åne de Jong committed
13
14
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Jørn Åne de Jong's avatar
Jørn Åne de Jong committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  stage: build
  script:
    - build
  only:
    - branches

production:
  stage: production
  variables:
    CI_ENVIRONMENT_URL: $KUBE_PROD_URL
  script:
    - deploy kubernetes.yaml
  environment:
    name: production
    url: $KUBE_PROD_URL
  when: manual
  only:
    - master

staging:
  stage: staging
  variables:
    CI_ENVIRONMENT_URL: $KUBE_STAGING_URL
    REPLICAS: '1'
  script:
    - deploy kubernetes.yaml
  environment:
    name: staging
    url: $KUBE_STAGING_URL
  only:
    - master