Skip to content
Snippets Groups Projects
.gitlab-ci.yml 794 B
Newer Older
include:
  - project: 'sre/ci-building-blocks'
    file: '/gitlab-ci/node/kaniko.yml'
anne.matthes's avatar
anne.matthes committed

  INGRESS_HOSTNAME: ui-middleware-$CI_COMMIT_REF_SLUG
build image:
  before_script:
    - "[ -z \"$APP_VERSION\" ] && export APP_VERSION=$CI_COMMIT_TAG"
    - "[ -z \"$APP_VERSION\" ] && export APP_VERSION=$(cat package.json | grep 'version' | cut -f 4 -d'\"')"
    - echo "Building version $APP_VERSION"
  extends: .build image

deploy helm chart:
  extends: .auto-deploy-helm-chart
  environment:
    name: $CI_COMMIT_REF_SLUG
    on_stop: tear down
    auto_stop_in: 1 week
    url: https://ui-middleware-$CI_COMMIT_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
  after_script:
    - envsubst < .gitlab-ci/kubernetes-resources.yaml > tmp-k8s-resources.yaml
    - kubectl apply -f tmp-k8s-resources.yaml