Jenkins ecs Command not found

ε祈祈猫儿з 提交于 2020-03-04 15:33:25

问题


I installed third party tool (ecs deploy using pip install ecs-deploy) .When I try to deploy using command ecs deploy demo-cluster demo-service in command prompt its working fine when I try with jenkins to deploy getting error

/tmp/jenkins5062380414579854312.sh: line 13: ecs: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE

回答1:


The Jenkins service runs typically runs under the user jenkins.

You have installed the package as the ec2-user. This means the jenkins user may not have the package in its own path or have correct permissions to execute the file.

You can correct this one of two ways:

  1. Use sudo to elevate permissions and install it globally. Set the path in /etc/environment
  2. Interactively login as the jenkins user and install under that account.



回答2:


You need to run the full AWS CLI command:

aws ecs deploy --cluster demo-cluster --service demo-service


来源:https://stackoverflow.com/questions/60044044/jenkins-ecs-command-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!