CodeDeploy在一个本地实例上找不到AppSpec.yml

时间:2018-07-06 09:45:18

标签: windows amazon-web-services aws-code-deploy

我已经通过CodeDeploy运行部署已有一段时间了,但是几周前,CodeDeploy开始使我的一个本地实例的每个部署(以前所有工作都没有问题)都失败,并在BeforeInstall处出现以下错误:

  

没有此类文件或目录-C:\ ProgramData / Amazon / CodeDeploy / 02b29d0e-63b6-46b4-a7e4-ff7388bd510a / d-AJW81DA4U / deployment-archive / appspec.yml

如果以后再检查该目录,则该文件显然位于该目录中并且可以访问。我尝试过以管理员帐户(确实有权访问该文件)和本地系统(据我所知应该仍然可以访问所有内容)的身份运行CodeDeploy代理服务。

在CodeDeploy的日志文件(其中包括调试级别的日志)中最后提及该部署的是代理,报告了DownloadBundle步骤的成功。

我正在使用Atlassian的Bamboo调用CodeDeploy,并且同一部署成功到另一个本地实例(也是Windows计算机),在Bamboo中的配置与部署组相同。

有时,CodeDeploy不会出现上述错误,但会出现此错误(也在BeforeInstall上),并且部署目录为空(甚至不包含下载的软件包):

  

CodeDeploy代理在相对版本的相对路径“ appspec.yml”的解压缩版本目录中找不到AppSpec文件。该修订版已解压缩到目录“ C:\ ProgramData / Amazon / CodeDeploy / 02b29d0e-63b6-46b4-a7e4-ff7388bd510a / d-VEP5Z464U / deployment-archive”,并且应获取AppSpec文件,但未在路径“ C:\中找到” ProgramData / Amazon / CodeDeploy / 02b29d0e-63b6-46b4-a7e4-ff7388bd510a / d-VEP5Z464U / deployment-archive / appspec.yml”。有关更多信息,请参阅http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html

的AWS CodeDeploy Appspec文档。

在这种情况下,日志文件显示以下错误:

  

2018-07-06T10:13:37错误[codedeploy-agent(8156)]:InstanceAgent :: Plugins :: CodeDeployPlugin :: CommandPoller:执行期间出错:RuntimeError-CodeDeploy代理未在以下位置找到AppSpec文件相对于修订相对路径“ appspec.yml”的解压缩修订目录。该修订版已解压缩到目录“ C:\ ProgramData / Amazon / CodeDeploy / 02b29d0e-63b6-46b4-a7e4-ff7388bd510a / d-VEP5Z464U / deployment-archive”,并且应获取AppSpec文件,但未在路径“ C:\中找到” ProgramData / Amazon / CodeDeploy / 02b29d0e-63b6-46b4-a7e4-ff7388bd510a / d-VEP5Z464U / deployment-archive / appspec.yml”。有关更多信息,请查阅http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html上的AWS CodeDeploy Appspec文档-C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:213:in parse_app_spec' C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:100:in初始化'   C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:147:在地图中new' C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:147:in块(3个级别)中   C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:146:在地图each' C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:146:in块(2个级别)中   C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:68:in execute_command' C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:114:in process_command'   C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:96:在acknowledge_and_process_command' C:/Windows/TEMP/ocr5F30.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:75:in中阻止执行'   C:/Windows/Temp/ocr5F30.tmp/gemhome/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:在create_worker的run_task' C:/Windows/Temp/ocr5F30.tmp/gemhome/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in块(3个级别)中   C:/Windows/Temp/ocr5F30.tmp/gemhome/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:在create_worker的loop' C:/Windows/Temp/ocr5F30.tmp/gemhome/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in块(2个级别)中   C:/Windows/Temp/ocr5F30.tmp/gemhome/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in catch' C:/Windows/Temp/ocr5F30.tmp/gemhome/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in中的create_worker块   C:/Windows/Temp/ocr5F30.tmp/lib/ruby/gems/2.3.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:在`create_with_logging_context中的块中

在撰写本文时(1.0.1.1518),我正在运行最新版本的CodeDeploy,并且我尝试重新启动代理,重新启动包装盒并重新安装代理服务。没有任何改变。

1 个答案:

答案 0 :(得分:0)

我本人也碰到了同样的事情,事实证明,这是我将文件上传/存档之前将文件压缩/存档的方式,以便代码部署使用它们。就我而言,事实证明我的文件夹路径中有一个额外的目录。

如果以前的部署可行,请尝试进行部署。如果可行,则将其目录结构与不起作用的部署进行比较。