不重新部署AWS服务。如何解决?

时间:2020-07-23 12:56:56

标签: amazon-web-services amazon-ecs circleci

在通过Circle CI更新AWS ECS服务后,我试图重新部署它。

步骤的顺序是构建一个新的Docker映像,将其上传到AWS存储库,然后在群集上重新部署该服务。

这是我下面的配置文件。一切都以“成功”运行,但是,该服务未重新部署。怎么了?

version: 2.1
orbs:
  aws-ecr: circleci/aws-ecr@6.10.0
  aws-ecs: circleci/aws-ecs@1.2.0
  aws-cli: circleci/aws-cli@1.2.1
  aws-white-list-circleci-ip: configure/aws-white-list-circleci-ip@1.0.1
jobs:
  test:
    docker:
      - image: cypress/base:12.18.0
    steps:
      - checkout
      - aws-cli/install
      - aws-cli/setup
      - aws-white-list-circleci-ip/add:
          port: 7474
      - run: npm ci
      - run: npm run cy:verify
      # save npm dependencies and Cypress binary for future runs
      - save_cache:
          key: cache-{{ checksum "package.json" }}
          paths:
            - ~/.npm
            - ~/.cache
      - run: npm run test:ci
      - aws-white-list-circleci-ip/remove:
          port: 7474


workflows:
  version: 2.1
  test-and-deploy:
    jobs:
      - test
      - aws-ecr/build-and-push-image:
          requires:
            - test
          create-repo: true
          no-output-timeout: 10m
          repo: 'service-prod-instance'
      - aws-ecs/deploy-service-update:
          requires:
            - aws-ecr/build-and-push-image
          family: 'Service-Production'
          cluster-name: 'Service-Production'
          service-name: 'Service-Com-Live'
          force-new-deployment: true
``

0 个答案:

没有答案