我已将 AWS CodeDeploy 连接到 github。没有 CodeBuild。 CodeDeploy 在 BeforeInstall 步骤中失败。
appspec.yml
version: 0.0
os: linux
hooks:
BeforeInstall:
- location: scripts/RunMyBot.sh
timeout: 300
runas: root
RunMybot.sh
#!bin/bash
sudo python3 -m pip install --user --upgrade pip
pip3 install -r requirements.txt
python3 ./botMain.py
错误日志:
LifecycleEvent - BeforeInstall
Script - scripts/RunMyBot.sh
[stderr]sudo: python3: command not found
[stderr]/opt/codedeploy-agent/deployment-root/.../deployment-archive/scripts/RunMyBot.sh: line 4: pip3: command not found
[stderr]/opt/codedeploy-agent/deployment-root/.../deployment-archive/scripts/RunMyBot.sh: line 5: python3: command not found
目录树:
- botMain.py
- requirements.txt
- scripts/
- RunMyBot.sh