From 2a55fd33d02aed35135040cfae6c6990820d1116 Mon Sep 17 00:00:00 2001 From: Danny August Ramaputra Date: Mon, 12 Jul 2021 23:09:56 +1000 Subject: [PATCH] ci: removed obsolete gitlab ci config --- ..gitlab-ci.yml | 183 ------------------------------------------------ 1 file changed, 183 deletions(-) delete mode 100644 ..gitlab-ci.yml diff --git a/..gitlab-ci.yml b/..gitlab-ci.yml deleted file mode 100644 index beca2b8..0000000 --- a/..gitlab-ci.yml +++ /dev/null @@ -1,183 +0,0 @@ -stages: - - build - - test - - image - - chart - -# ------------------------ ratify-be -build ratify-be: - stage: build - image: daystram/go-builder:1.15 - script: - - cd ratify-be - - swag init - - go mod tidy - - go build -a -o app . - artifacts: - paths: - - ratify-be/app - - ratify-be/docs/swagger.json - -test ratify-be: - stage: test - image: daystram/go-builder:1.15 - dependencies: - - "build ratify-be" - script: - - cd ratify-be - - go test ./tests/... - -image dev ratify-be: - stage: image - image: docker:19.03.12 - needs: ["test ratify-be"] - environment: - name: development-be - variables: - DOCKER_TLS_CERTDIR: "/certs" - services: - - docker:19.03.12-dind - before_script: - - echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY - script: - - cd ratify-be - - docker build --tag $CI_REGISTRY_IMAGE:be-dev . - - docker push $CI_REGISTRY_IMAGE:be-dev - when: manual - only: - - branches - except: - - master - -image prod ratify-be: - stage: image - image: docker:19.03.12 - needs: ["test ratify-be"] - environment: - name: production-be - variables: - DOCKER_TLS_CERTDIR: "/certs" - services: - - docker:19.03.12-dind - before_script: - - echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY - script: - - cd ratify-be - - docker build -t $CI_REGISTRY_IMAGE:be -t $CI_REGISTRY_IMAGE:be-$CI_COMMIT_TAG . - - docker push $CI_REGISTRY_IMAGE:be - - docker push $CI_REGISTRY_IMAGE:be-$CI_COMMIT_TAG - when: on_success - only: - - tags - -# ------------------------ ratify-fe -build ratify-fe: - stage: build - image: node:lts-alpine - script: - - cd ratify-fe - - yarn install - - yarn build - artifacts: - paths: - - ratify-fe/dist/ - -image dev ratify-fe: - stage: image - image: docker:19.03.12 - needs: ["build ratify-fe"] - environment: - name: development-fe - variables: - DOCKER_TLS_CERTDIR: "/certs" - services: - - docker:19.03.12-dind - before_script: - - echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY - script: - - cd ratify-fe - - cp $VUE_ENV_FILE ./.env.production - - docker build --tag $CI_REGISTRY_IMAGE:fe-dev . - - docker push $CI_REGISTRY_IMAGE:fe-dev - when: manual - only: - - branches - except: - - master - -image prod ratify-fe: - stage: image - image: docker:19.03.12 - needs: ["build ratify-fe"] - environment: - name: production-fe - variables: - DOCKER_TLS_CERTDIR: "/certs" - services: - - docker:19.03.12-dind - before_script: - - echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY - script: - - cd ratify-fe - - cp $VUE_ENV_FILE ./.env.production - - docker build -t $CI_REGISTRY_IMAGE:fe -t $CI_REGISTRY_IMAGE:fe-$CI_COMMIT_TAG . - - docker push $CI_REGISTRY_IMAGE:fe - - docker push $CI_REGISTRY_IMAGE:fe-$CI_COMMIT_TAG - when: on_success - only: - - tags - -# ------------------------ chart -chart dev ratify: - stage: chart - image: daystram/k8s-tools:latest - needs: ["image dev ratify-be", "image dev ratify-fe"] - variables: - APPLICATION_NAME: "ratify" - APPLICATION_VERSION: "v0.0.0-development" - before_script: - - git config --global user.name "$BOTDAYSTRAM_NAME" - - git config --global user.email "$BOTDAYSTRAM_EMAIL" - - mkdir -p ~/.ssh && eval `ssh-agent -s` && ssh-keyscan github.com >> ~/.ssh/known_hosts - - cat $BOTDAYSTRAM_KEY_FILE | ssh-add - - - cat $KUBECONFIG_FILE > $KUBECONFIG && chmod 700 $KUBECONFIG - script: - - git clone git@github.com:daystram/helm-charts.git - - cp -r .daystram helm-charts/docs/ - - cd helm-charts/docs/ - - curl -sfL https://charts.daystram.com/build.sh | sh -s - $APPLICATION_NAME $APPLICATION_VERSION - - rm -rf .daystram/ - - git add . - - 'git commit -m "feat: added chart for ${APPLICATION_NAME}@${APPLICATION_VERSION}"' - - git push - when: on_success - only: - - branches - except: - - master - -chart prod ratify: - stage: chart - image: daystram/k8s-tools:latest - needs: ["image prod ratify-be", "image prod ratify-fe"] - variables: - APPLICATION_NAME: "ratify" - APPLICATION_VERSION: "$CI_COMMIT_TAG" - before_script: - - git config --global user.name "$BOTDAYSTRAM_NAME" - - git config --global user.email "$BOTDAYSTRAM_EMAIL" - - mkdir -p ~/.ssh && eval `ssh-agent -s` && ssh-keyscan github.com >> ~/.ssh/known_hosts - - cat $BOTDAYSTRAM_KEY_FILE | ssh-add - - - cat $KUBECONFIG_FILE > $KUBECONFIG && chmod 700 $KUBECONFIG - script: - - git clone git@github.com:daystram/helm-charts.git - - cp -r .daystram helm-charts/docs/ - - cd helm-charts/docs/ - - curl -sfL https://charts.daystram.com/build.sh | sh -s - $APPLICATION_NAME $APPLICATION_VERSION - - rm -rf .daystram/ - - git add . - - 'git commit -m "feat: added chart for ${APPLICATION_NAME}@${APPLICATION_VERSION}"' - - git push - when: on_success - only: - - tags