InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor:生命周期事件ApplicationXXXX是一个noop

问题描述 投票:0回答:1

我在做什么?

使用

codedeploy
在 ec2 中部署应用程序。

os: linux
files:
  - source: /
    destination: /home/ec2-user/xxx-api
file_exists_behavior: OVERWRITE
permissions:
  - object: /home/ec2-user/xxx-api/zarf/aws/application_stop.sh
    mode: 777
    pattern: "**"
    type:
      - file

hook:
  ApplicationStop:
    - location: /home/ec2-user/xxx-api/zarf/aws/application_stop.sh
      timeout: 300
      runas: ec2-user

我们知道代码是从

s3
拉过来的。当我 ssh 到 ec2 时,我可以看到最新的更新。

有什么问题

看起来钩子没有运行。当我访问日志时,我看到以下错误:

InstanceAgent::Plugins::C odeDeployPlugin::CommandExecutor: Lifecycle event ApplicationXXXX is a noop

代码部署成功完成,无需运行任何脚本。

我尝试了什么

  1. 我通过 sshed 进入 ec2,并确保所有脚本都可以使用相同的权限和用户运行
  2. 我确保 ec2 具有正确的角色
  3. 我确保文件正在更新
aws-code-deploy
1个回答
0
投票

我这里也有同样的问题。挂钩似乎根本没有运行,并且 codedeploy 报告部署成功。我明白了

2024-01-11T09:59:33 INFO [codedeploy-agent(2174)]:InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor:生命周期事件 ApplicationStart 是一个 noop 2024-01-11T09:59:33 INFO [codedeploy-agent(2174)]:InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor:命令 ApplicationStart 的 Noop 检查已完成,所有生命周期事件都是 noop。

© www.soinside.com 2019 - 2024. All rights reserved.