diff --git a/.circleci/config.yml b/.circleci/config.yml index 158ce7398..4b686c70c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,5 @@ version: 2.1 orbs: - k8s: circleci/kubernetes@0.7.0 slack: circleci/slack@3.4.2 commands: npm_install_from_cache: @@ -33,49 +32,6 @@ commands: name: Tag build command: echo "<< parameters.version_name >> $(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version - docker_build_push: - description: "Build and push Docker image to Docker Hub" - parameters: - docker_latest_image_tag: - type: string - default: "latest-staging" - docker_image_tag: - type: string - default: ${CIRCLE_SHA1} - steps: - - setup_remote_docker - - run: - name: Building docker image - command: | - docker build -t ${DOCKHUB_ORGANISATION}/deriv-com-api:<< parameters.docker_image_tag >> -t ${DOCKHUB_ORGANISATION}/deriv-com-api:<< parameters.docker_latest_image_tag >> . - - run: - name: Pushing Image to docker hub - command: | - echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin - docker push ${DOCKHUB_ORGANISATION}/deriv-com-api:<< parameters.docker_image_tag >> - docker push ${DOCKHUB_ORGANISATION}/deriv-com-api:<< parameters.docker_latest_image_tag >> - k8s_deploy: - description: "Deploy to k8s cluster" - parameters: - target: - type: string - default: "beta" - k8s_version: - type: string - default: ${CIRCLE_SHA1} - k8s_namespace: - type: string - default: "deriv-com-api-staging" - steps: - - k8s/install-kubectl - - run: - name: Deploying to k8s cluster for service << parameters.k8s_namespace >> - command: | - export NAMESPACE=<< parameters.k8s_namespace >> - git clone https://github.com/binary-com/devops-ci-scripts - cd devops-ci-scripts/k8s-build_tools - echo $CA_CRT | base64 --decode > ca.crt - ./release.sh deriv-com-api << parameters.k8s_version >> notify_slack: description: "Notify slack" steps: @@ -123,8 +79,6 @@ jobs: - npm_install_from_cache - build - versioning - - docker_build_push - - k8s_deploy - publish_to_pages_staging - notify_slack environment: @@ -139,12 +93,6 @@ jobs: - build - versioning: version_name: production - - docker_build_push: - docker_latest_image_tag: latest - docker_image_tag: ${CIRCLE_SHA1} - - k8s_deploy: - k8s_namespace: "deriv-com-api-production" - k8s_version: ${CIRCLE_SHA1} - publish_to_pages_production - notify_slack environment: