Here is my infrastructure:
On M2 , I have installed AWC CLI using pip , and run aws
command manually successfully.
I set up the J job to run that aws
command. But when J runs, it fails and the error message is:
... aws: command not found
Do you have any idea this happens and how to fix it?
Thank you.
Not so tough though: I should have given the full path to aws
tool. In my case, the correct command should be:
/usr/local/bin/aws <other sub-command and options>
This solves the problem. Hope this will save someone few hours struggling.
如果Nguyen的解决方案无效,请尝试使用此路径,设置[使用EnvInject]的My Jenkins构建以在/home/jenkins/.local/bin/aws
安装AWS
为了提供一个通用的工作解决方案,你可以执行which aws
将提供aws二进制文件的确切路径,甚至: $(which aws)
等同于执行aws
在你的jenkins服务器上'sudo -i -u jenkins'在jenkins用户下安装aws cli。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.