From 2c22b30bf0b4eeb2c1a6f9cc49c0bfac00fc3be0 Mon Sep 17 00:00:00 2001 From: somanath21 <104554892+somanath21@users.noreply.github.com> Date: Fri, 21 Jul 2023 15:20:07 +0530 Subject: [PATCH] test deployment with circelci (#37) * test deployment with circelci * test deployment with circelci * add kubernetes command --------- Co-authored-by: Somanath Hugar --- .circleci/config.yml | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..c5b494a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,62 @@ +version: 2.1 +orbs: + slack: circleci/slack@4.12.5 + helm: circleci/helm@2.0.1 + aws-eks: circleci/aws-eks@2.2.0 + kubernetes: circleci/kubernetes@1.3 +jobs: + deploy-helm-chart: + docker: + - image: cimg/python:3.10 + parameters: + cluster-name: + description: "sit" + type: string + environment: + TERM: dumb + steps: + - checkout + - kubernetes/install-kubectl + - aws-eks/update-kubeconfig-with-authenticator: + cluster-name: "sit" + aws-region: "us-east-2" + - helm/install-helm-client: + version: "v3.8.2" + - run: helm ls --namespace=fineract + - run: echo $AWS_PROFILE + - run: echo $AWS_DEFAULT_PROFILE + - run: kubectl config use-context arn:aws:eks:us-east-2:419830066942:cluster/sit + - run: kubectl config get-contexts + - run: rm -f helm/g2pconnect-superset/Chart.lock helm/g2pconnect-superset/requirements.lock helm/g2pconnect-superset/charts/* + - run: helm dep up helm/g2pconnect-superset + - run: helm upgrade -f helm/g2pconnect-superset/values.yaml fineract helm/g2pconnect-superset --install --create-namespace --namespace fineract + migrating-tenants: + docker: + - image: 'cimg/base:2023.07' + steps: + - kubernetes/install-kubectl + - run: sleep 180 + - run: echo $AWS_PROFILE + - run: echo $AWS_DEFAULT_PROFILE + - run: kubectl config use-context arn:aws:eks:us-east-2:419830066942:cluster/sit + - run: kubectl delete pods -n fineract `kubectl get pods -n fineract | grep fineract-server | cut -d " " -f1` +workflows: + version: 2 + build-and-test: + jobs: + - deploy-helm-chart: + cluster-name: sit + context: + - AWS + - Helm + - slack + - Secrets + - migrating-tenants: + cluster-name: sit + requires: + - deploy-helm-chart + context: + - AWS + - Helm + - slack + - Secrets