【问题标题】:Why the file.txt is not being deployed to my server?为什么 file.txt 没有部署到我的服务器上?
【发布时间】:2020-05-30 04:02:06
【问题描述】:

在我现有的 aws 管道中,我有以下 buildspec.yml

version: 0.2

phases:
  build:
    commands:
      - cd media/web/front_dev
      - echo "Hello" > ../web/txt/hello.txt

artifacts:
  files:
    - ./media/web/hello.txt

appspec.yml 有以下内容

version: 0.0
os: linux
files:
  - source: /
    destination: /webserver/src/public

但是文件hello.txt 没有在部署阶段部署到服务器?一旦我 ssh 进入机器,我就会运行以下命令:

/webserver/src/public/media/web/hello.txt

但是文件没有显示。你知道为什么吗?

我的管道最初只有一个源和一个部署步骤,然后我对其进行了编辑,以便也有一个代码构建步骤。

【问题讨论】:

  • 你在运行什么样的网络容器——tomcat、apache?

标签: amazon-web-services pipeline aws-code-deploy aws-codebuild


【解决方案1】:

检查您的管道。您可能已经添加了构建步骤,但部署只是从版本控制而不是部署中获取代码。为了解决这个问题,请按照以下步骤操作:

  1. 在构建步骤中指定输出工件的名称。
  2. 选择您在构建步骤中作为输出工件放入的工件作为输入工件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-20
    • 2022-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多