Here's my stop_server.sh file under the scripts folder in my Angular root directory:
#!/bin/bash
isExistApp = `pgrep httpd`
if [[ -n $isExistApp ]]; then
service httpd stop
fi
The error message that I get is "ScriptMissing" at the ApplicationStop step. The script is not missing. I stopped my codedeploy agent, tried to clear out the files under /opt/codedeploy-agent/deployment-root (but many were write protected), and restarted the codedeploy agent. No success after numerous attempts to get CodeDeploy to complete successfully. What should I do to get CodeDeploy working properly?"
I clear out all references to previous deployments. I create a new deployment and run it. The error message I get is:
scripts/test-script.sh "BeforeInstall" Script does not exist at specified location: /opt/codedeploy-agent/deployment-root/f533eddd-98eb-4276-9454-c657056ccd25/d-ZAJ4AH94G/deployment-archive/scripts/test-script.sh "BeforeInstall" View more.
N.b. test-script.sh contains only echo $1. It's a test-file that I'll update once I have this deployment pipeline working sucessfully.
My question is: How do I get the EC2 to run the scripts from my project's root directory, and not this /opt/codedeploy-agent/deployment-root/<deployment-id> directory?
I'm facing a similar issue. Here's my
Appspec.yml
:I clear out all references to previous deployments. I create a new deployment and run it. The error message I get is:
scripts/test-script.sh "BeforeInstall" Script does not exist at specified location: /opt/codedeploy-agent/deployment-root/f533eddd-98eb-4276-9454-c657056ccd25/d-ZAJ4AH94G/deployment-archive/scripts/test-script.sh "BeforeInstall" View more.
N.b.
test-script.sh
contains onlyecho $1
. It's a test-file that I'll update once I have this deployment pipeline working sucessfully.My question is: How do I get the EC2 to run the scripts from my project's root directory, and not this
/opt/codedeploy-agent/deployment-root/<deployment-id>
directory?