使用circleCI在AWS上部署LAMP应用程序

时间:2018-05-02 11:13:42

标签: amazon-web-services docker workflow circleci

我正在尝试使用CircleCI将应用程序部署到AWS。 我已阅读文档并参考https://circleci.com/docs/2.0/deployment-integrations/

我无法理解在AWS

下使用命令
> steps:
>   - run:
>       name: Deploy to S3 if tests pass and branch is Master
>       command: aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/ --delete

我尝试过运行基本的yml

version: 2
jobs:
  #  build and test jobs go here
  deploy-job:
    docker:
      - image: testapp1234/lamp_new:part1
#    working_directory: /tmp/my-project
    steps:
      - run:
          name: Deploy to S3 if tests pass and branch is Master
          command: echo "Hello"
#          command: aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/ --delete

我在CircleCI中遇到此错误

no subschema matched out of the total 2 subschemas
  required key [workflows] not found
  jobs: required key [build] not found

如何使用它将我的应用部署到AWS实例。我可以使用此命令部署docker容器吗?

我无法理解这里使用的工作流程。

1 个答案:

答案 0 :(得分:0)

如果这是您的完整配置,那么您现在还没有使用工作流程。如果是这样,那么您可以使用的唯一作业名称是[['hello'], ['cat'], ['dog'], ['hey'], ['dog'], ['I'], ['need'], ['coffee'], ['dance'], ['dream'], ['job']] ,而不是build,这是您当前正在使用的名称。

您可以1)修复作业名称或2)添加适当的工作流程配置。您可以告诉自己何时这样做,因为deploy-job将成为此CircleCI配置中的顶级键。可以找到特定于工作流程的文档here

我希望有所帮助。

相关问题