jenkins - aws cloudformation 部署在添加 --tags 时失败

标签 jenkins aws-cloudformation

我尝试使用 --tags 选项运行 aws cloudformation deploy,但出现以下错误:

Error in jenkins pipeline console:
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument subcommand: Invalid choice, valid choices are:

push                                     | register                                
deregister                               | install    

完整命令:

sh "aws cloudformation deploy --region=us-east-1 --template-file template.yaml --stack-name template-stack --parameter-overrides parameter1=value1 --tags keyname=keyvalue"

删除 --tags key=value 后 Cloudformation 模板已成功上传。

最佳答案

您可能使用旧版本的 aws-cli。这个feature仅在 2018 年 1 月合并(请参阅 this Pull-request)。因此,请检查您的版本并根据需要进行更新。

关于jenkins - aws cloudformation 部署在添加 --tags 时失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54302861/

相关文章:

Grails 3.x 和 Jenkins : Save BUILD_NUMBER and date when deploying

jenkins - 如何在 Jenkins Pipeline 中使用源代码管理

amazon-web-services - Cloudformation 自定义资源

amazon-web-services - AWS Cloudwatch 警报在达到阈值后未触发

jenkins - 如何复制和粘贴或复制现有项目?

java - Selenium webdriver click() 在 jenkins 中失败

go - 使用私有(private)存储库中的依赖项在 Jenkins 中构建 go 项目

amazon-web-services - 通过 Terraform 或 Cloudformation 启用和配置 AWS Cognito 高级安全功能

amazon-web-services - AWS Cloudformation 将条件函数解释为资源属性

amazon-web-services - 使用 CodePipeline 从单个 CloudFormation 模板批量创建资源