.gitlab-ci.yml 745 Bytes
Newer Older
Jørn Åne de Jong's avatar
Jørn Åne de Jong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 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
image: registry.uninett.no/system/kubernetes-deploy:v0.8

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

stages:
  - build
  - staging
  - production

build:
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  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