需要移动已部署的文件夹 - AWS CodeDeploy
Need to move deployed folder - AWS CodeDeploy
所以我想部署我的应用程序。我有一个移动脚本,可以将所有已部署的文件移动到需要发送的位置。
但是当该脚本在 BeforeInstall 阶段 运行 时,它无法找到文件。
所以我在脚本里加了pwd,目录是"deployment-root"。我想我需要进入部署文件夹,但 id 总是不同的。
有什么方法可以在我的 appspec.yml 文件中获取该 ID,以便我可以在我的部署脚本中将其 cd 进去吗?
谢谢,
您不必手动复制,在 appspect.yml 中,在 "files" 部分,您可以指定文件复制到的内容和位置。
files:
- source: Config/config.txt
destination: /webapps/Config
- source: source
destination: /webapps/myApp
Provides information to CodeDeploy about which files from your application revision should be installed on the instance during the deployment's Install event.
通过此页面获取更多详细信息:
https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-files.html
所以我想部署我的应用程序。我有一个移动脚本,可以将所有已部署的文件移动到需要发送的位置。
但是当该脚本在 BeforeInstall 阶段 运行 时,它无法找到文件。
所以我在脚本里加了pwd,目录是"deployment-root"。我想我需要进入部署文件夹,但 id 总是不同的。
有什么方法可以在我的 appspec.yml 文件中获取该 ID,以便我可以在我的部署脚本中将其 cd 进去吗?
谢谢,
您不必手动复制,在 appspect.yml 中,在 "files" 部分,您可以指定文件复制到的内容和位置。
files:
- source: Config/config.txt
destination: /webapps/Config
- source: source
destination: /webapps/myApp
Provides information to CodeDeploy about which files from your application revision should be installed on the instance during the deployment's Install event.
通过此页面获取更多详细信息: https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-files.html