From cb01bfc9eab917dfe657fb92624e61611525b410 Mon Sep 17 00:00:00 2001 From: kandrusyak Date: Tue, 4 Jul 2023 02:08:47 +0300 Subject: [PATCH] add universal pipeline --- .gitlab-ci.yml | 44 ++++--------------------------------- deploy/values.template.yaml | 2 +- 2 files changed, 5 insertions(+), 41 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc9e39a..25571c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,40 +1,4 @@ -image: docker:20.10.16 - -variables: - DOCKER_HOST: tcp://docker:2376 - DOCKER_TLS_CERTDIR: "/certs" - DOCKER_TLS_VERIFY: 1 - DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client" - -services: - - docker:20.10.16-dind - -stages: - - build - - deploy - -build-job: - stage: build - tags: - - docker - only: - - master - script: - - docker info - - docker build -t docker-registry.dopcore.com/$CI_PROJECT_PATH . - - echo "$CI_REGISTRY_PASSWORD" | docker login docker-registry.dopcore.com -u "$CI_REGISTRY_USER" --password-stdin - - docker push docker-registry.dopcore.com/$CI_PROJECT_PATH - -deploy-job: - stage: deploy - image: dtzar/helm-kubectl:latest - tags: - - docker - only: - - master - script: - - export $(xargs < deploy/.env) - - envsubst < deploy/values.template.yaml > deploy/values.yaml - - kubectl version - - helm upgrade --install $CI_PROJECT_TITLE deploy - - kubectl rollout restart deploy/$CI_PROJECT_TITLE +include: + - project: 'astra/microservice-ci' + ref: main + file: '/templates/microservice.yaml' diff --git a/deploy/values.template.yaml b/deploy/values.template.yaml index 6d3674f..0adf226 100644 --- a/deploy/values.template.yaml +++ b/deploy/values.template.yaml @@ -13,4 +13,4 @@ ingress: enabled: false autoscaling: - enabled: false \ No newline at end of file + enabled: false