cfnUpdate的管道aws插件引发WaiterUnrecoverableException

时间:2018-07-19 13:50:16

标签: amazon-web-services jenkins jenkins-plugins jenkins-pipeline amazon-cloudformation

当尝试运行pipeline-aws-plugin中的 cfnUpdate 时,我遇到WaiterUnrecoverableException,但是当通过Amazon控制台创建堆栈时,它的创建没有问题

详细信息:

版本管道:AWS步骤1.27

我正在尝试执行:

cfnUpdate(stack:"${stack}", url:"${urlTemplate}", params: 'roleName':"${roleName}",'bucket':"${bucket}",'pathS3':"${pathS3}",'handler':"${handler}"],timeoutInMinutes:10)

位置

  • ${stack}是堆栈中的数字
  • ${urlTemplate}是指向保存在S3上的模板的链接

并抛出Jenkins日志:

  

com.amazonaws.waiters.WaiterUnrecoverableException:资源从未因为失败而进入所需的状态。       在com.amazonaws.waiters.WaiterExecution.pollResource(WaiterExecution.java:78)       在com.amazonaws.waiters.WaiterImpl.run(WaiterImpl.java:88)       在com.amazonaws.waiters.WaiterImpl $ 1.call(WaiterImpl.java:110)       在com.amazonaws.waiters.WaiterImpl $ 1.call(WaiterImpl.java:106)       在java.util.concurrent.FutureTask.run(FutureTask.java:266)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)       在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)       在java.lang.Thread.run(Thread.java:748)       原因:java.util.concurrent.ExecutionException       在org.apache.http.concurrent.BasicFuture.getResult(BasicFuture.java:71)       在org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:84)       在de.taimos.pipeline.aws.cloudformation.EventPrinter.waitAndPrintEvents(EventPrinter.java:135)       在de.taimos.pipeline.aws.cloudformation.EventPrinter.waitAndPrintStackEvents(EventPrinter.java:92)       在de.taimos.pipeline.aws.cloudformation.CloudFormationStack.create(CloudFormationStack.java:119)       在de.taimos.pipeline.aws.cloudformation.CFNUpdateStep $ Execution.whenStackMissing(CFNUpdateStep.java:125)处       在de.taimos.pipeline.aws.cloudformation.AbstractCFNCreateStep $ Execution $ 1.run(AbstractCFNCreateStep.java:137)

作为参考,我的模板类似于:

Cloudformation Template

也许有人可以帮我解决这个问题或向我推荐一些调整?

致谢

1 个答案:

答案 0 :(得分:0)

您正在关闭“参数”数组,但没有打开它。试试这个:

cfnUpdate(stack:"${stack}", url:"${urlTemplate}", params: ['roleName':"${roleName}",'bucket':"${bucket}",'pathS3':"${pathS3}",'handler':"${handler}"],timeoutInMinutes:10)