Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 为什么没有将file.txt部署到我的服务器?_Amazon Web Services_Pipeline_Aws Code Deploy_Aws Codebuild - Fatal编程技术网

Amazon web services 为什么没有将file.txt部署到我的服务器?

Amazon web services 为什么没有将file.txt部署到我的服务器?,amazon-web-services,pipeline,aws-code-deploy,aws-codebuild,Amazon Web Services,Pipeline,Aws Code Deploy,Aws Codebuild,在我现有的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 fil

在我现有的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
但是文件没有显示。你知道为什么吗


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

检查管道。您可能已经添加了构建步骤,但部署只是从版本控制而不是部署中获取代码。要解决此问题,请执行以下步骤:

  • 在构建步骤中指定输出工件的名称
  • 选择在构建步骤中作为输出工件放入的工件作为输入工件

  • 您正在运行什么样的web容器—tomcat、apache?