【发布时间】:2017-12-26 13:41:09
【问题描述】:
我在Jenkins 的windows 从站上安装了AWS CLI。为了验证这一点,我在 windows 机器的命令行中运行以下命令并将其作为输出
C:> aws --version
aws-cli/1.11.122 Python/2.7.9 Windows/2008ServerR2 botocore/1.5.85
我在 jenkins 作业的执行 windows 批处理命令中运行 aws cli 命令,作业失败,原因如下
C:\Users\ADMINI~1\AppData\Local\Temp\2\hudson1929374596375903011.sh: line 6:
aws: command not found
Build step 'Execute shell' marked build as failure
我正在运行的aws 命令是
aws cloudformation validate-template --template-body file://file1.json
我还检查了 Windows 机器上的 PATH 变量,它包含 AWSCLI 路径。
我的目标是通过 Jenkins 作业运行 AWS CLI 命令。有人可以帮我解决这个问题吗?
【问题讨论】:
-
您可能需要明确设置您的 jenkins PATH。见stackoverflow.com/questions/36473479/…
标签: amazon-web-services jenkins aws-cli amazon-cloudformation