Skip to content

Commit

Permalink
Merge pull request #20 from babylonchain/no_cd
Browse files Browse the repository at this point in the history
chore: Remove CD
  • Loading branch information
filippos47 authored Jun 21, 2024
2 parents c04e2af + 6510afa commit 6409ebf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 267 deletions.
137 changes: 0 additions & 137 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,105 +85,6 @@ jobs:
repo: "staking-expiry-checker"
tag: "$CIRCLE_SHA1,$CIRCLE_TAG"

deploy_staging:
machine:
image: ubuntu-2204:2024.01.1
resource_class: large
steps:
- checkout
- aws-ecr/ecr-login:
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
region: "$AWS_REGION"
- kubernetes/install-kubeconfig:
kubeconfig: TESTNET_KUBECONFIG
- helm/install-helm-client
- run:
name: Fetch and replace RabbitMQ credentials from CircleCi env vars
command: |
HELM_VALUES=/home/circleci/project/.circleci/values-staging.yaml
sed -i "s/RABBITMQ_USER/$RABBITMQ_USER_STAGING/g" $HELM_VALUES
sed -i "s/RABBITMQ_PASSWORD/$RABBITMQ_PASSWORD_STAGING/g" $HELM_VALUES
sed -i "s/BTC_USER/$BTC_USER/g" $HELM_VALUES
sed -i "s/BTC_PASS/$BTC_PASS/g" $HELM_VALUES
- run:
name: Perform a dry run of the new release
command: |
helm upgrade --install --debug --dry-run \
-n $DEPLOY_STAGING_NAMESPACE \
--values /home/circleci/project/.circleci/values-staging.yaml \
--version $HELM_CHART_VERSION \
--set deployment.version=$CIRCLE_SHA1 \
staking-expiry-checker $HELM_CHART_REPO
- run:
name: Release new service version in an atomic way
command: |
helm upgrade --install --debug --atomic --wait \
-n $DEPLOY_STAGING_NAMESPACE --create-namespace \
--values /home/circleci/project/.circleci/values-staging.yaml \
--version $HELM_CHART_VERSION \
--set deployment.version=$CIRCLE_SHA1 \
staking-expiry-checker $HELM_CHART_REPO
deploy_testnet:
machine:
image: ubuntu-2204:2024.01.1
resource_class: large
steps:
- checkout
- aws-ecr/ecr-login:
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
region: "$AWS_REGION"
- kubernetes/install-kubeconfig:
kubeconfig: TESTNET_KUBECONFIG
- helm/install-helm-client
- run:
name: Fetch and replace RabbitMQ credentials from CircleCi env vars
command: |
HELM_VALUES=/home/circleci/project/.circleci/values-testnet.yaml
sed -i "s/RABBITMQ_USER/$RABBITMQ_USER/g" $HELM_VALUES
sed -i "s/RABBITMQ_PASSWORD/$RABBITMQ_PASSWORD/g" $HELM_VALUES
sed -i "s/BTC_USER/$BTC_USER/g" $HELM_VALUES
sed -i "s/BTC_PASS/$BTC_PASS/g" $HELM_VALUES
- run:
name: Perform a dry run of the new release
command: |
helm upgrade --install --debug --dry-run \
-n $DEPLOY_TESTNET_NAMESPACE \
--values /home/circleci/project/.circleci/values-testnet.yaml \
--version $HELM_CHART_VERSION \
--set deployment.version=$CIRCLE_SHA1 \
staking-expiry-checker $HELM_CHART_REPO
- run:
name: Release new service version in an atomic way
command: |
helm upgrade --install --debug --atomic --wait \
-n $DEPLOY_TESTNET_NAMESPACE --create-namespace \
--values /home/circleci/project/.circleci/values-testnet.yaml \
--version $HELM_CHART_VERSION \
--set deployment.version=$CIRCLE_SHA1 \
staking-expiry-checker $HELM_CHART_REPO
rollback_testnet:
machine:
image: ubuntu-2204:2024.01.1
resource_class: large
steps:
- checkout
- aws-ecr/ecr-login:
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
region: "$AWS_REGION"
- kubernetes/install-kubeconfig:
kubeconfig: TESTNET_KUBECONFIG
- helm/install-helm-client
- run:
name: Rollback Helm Chart to previous release
command: |
helm rollback --cleanup-on-fail --force --recreate-pods --wait \
--debug -n $DEPLOY_TESTNET_NAMESPACE staking-expiry-checker
workflows:
CICD:
jobs:
Expand All @@ -202,41 +103,3 @@ workflows:
only:
- main
- dev
- deploy_staging:
requires:
- push_docker
- build_lint_tests
filters:
branches:
only:
- main
- dev
- require_approval_deploy:
type: approval
requires:
- deploy_staging
filters:
branches:
only:
- main
- dev
- deploy_testnet:
requires:
- require_approval_deploy
filters:
branches:
only:
- main
- dev
- require_approval_rollback:
type: approval
requires:
- deploy_testnet
filters:
branches:
only:
- main
- dev
- rollback_testnet:
requires:
- require_approval_rollback
65 changes: 0 additions & 65 deletions .circleci/values-staging.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .circleci/values-testnet.yaml

This file was deleted.

0 comments on commit 6409ebf

Please sign in to comment.