From 95555ee8ce4f4cd1ebd912c2ff25495f85506d7f Mon Sep 17 00:00:00 2001 From: Ihor Diachenko Date: Sat, 24 Feb 2024 16:56:41 +0200 Subject: [PATCH] Rm gitlab-ci --- .gitlab-ci.yml | 122 ------------------------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index ec3a92b1..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,122 +0,0 @@ -default: - image: node:18.12.0 - tags: - - "tokend" - -variables: - DOCKER_DRIVER: overlay2 - DOCKER_HOST: tcp://docker:2375 - DOCKER_TLS_CERTDIR: "" - DOMAIN: docs.rarimo.com - GITHUB_REF: $CI_COMMIT_SHA - DH_IMAGE_NAME: $CI_PROJECT_ROOT_NAMESPACE/$CI_PROJECT_NAME - SERVICE: $CI_PROJECT_NAME - REGISTRY: registry.gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME - IMAGE_NAME: $REGISTRY:$CI_COMMIT_SHA - IMAGE_NAME_TAG: $REGISTRY:$CI_COMMIT_TAG - WERF_LOG_COLOR_MODE: "on" - WERF_IMAGES_REPO: $CI_REGISTRY_IMAGE - WERF_BUILDAH_MODE: auto - -.before_script_template: &before_script_templ - before_script: - - werf version - - docker version - - echo $CI_REGISTRY - - echo $WERF_IMAGES_REPO - - -stages: -- test -- build-and-publish -- deploy -- deploy-kubernetes - -test: - stage: test - script: - - yarn install --frozen-lockfile - - yarn lint - - yarn typecheck - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - -Build: - image: - name: "tokend/werf:0.0.11" - entrypoint: [""] - services: - - name: docker:20-dind - alias: docker - command: ["--tls=false"] - stage: build-and-publish - only: - - tags # todo: match v1.2.3 pattern - <<: *before_script_templ - script: - - export URL="https://docs.rarimo.com" - - export BASE_URL="/" - - type werf && source $(werf ci-env gitlab --as-file) - - werf build --report-path=images-report.json - - docker pull $(cat images-report.json | jq -r .Images.web.DockerImageName) - - docker tag $(cat images-report.json | jq -r .Images.web.DockerImageName) $IMAGE_NAME - - docker push $IMAGE_NAME - except: [schedules] - interruptible: true - -Build-staging: - image: - name: "tokend/werf:0.0.11" - entrypoint: [""] - services: - - name: docker:20-dind - alias: docker - command: ["--tls=false"] - stage: build-and-publish - only: - refs: - - main - <<: *before_script_templ - script: - - export URL="https://staging.docs.rarimo.com" - - export BASE_URL="/" - - export STAGING="true" - - type werf && source $(werf ci-env gitlab --as-file) - - werf build --report-path=images-report.json - - docker pull $(cat images-report.json | jq -r .Images.web.DockerImageName) - - docker tag $(cat images-report.json | jq -r .Images.web.DockerImageName) $IMAGE_NAME - - docker push $IMAGE_NAME - except: [schedules] - interruptible: true - -Deploy to Staging: - services: - - docker:18-dind - image: dtzar/helm-kubectl:latest - stage: deploy-kubernetes - only: - refs: - - main - script: - - mkdir ~/.kube/ - - echo ${k8sconfig} | base64 -d > config - - mv config ~/.kube/ - - helm upgrade -i "docs" ".helm" --set global.IngressDomain=staging.${DOMAIN} --set "image.repository=${REGISTRY}" --set "image.tag=${CI_COMMIT_SHA}" --create-namespace --namespace $CI_PROJECT_NAME-staging - interruptible: true - -Deploy to Production: - services: - - docker:18-dind - image: dtzar/helm-kubectl:latest - stage: deploy-kubernetes - only: - - tags - script: - - mkdir ~/.kube/ - - echo ${k8sconfig} | base64 -d > config - - mv config ~/.kube/ - - helm upgrade -i "docs" ".helm" --set global.IngressDomain=${DOMAIN} --set "image.repository=${REGISTRY}" --set "image.tag=${CI_COMMIT_SHA}" --create-namespace --namespace $CI_PROJECT_NAME-prod - interruptible: true - -