谁能帮我了解一下,我应该如何在我的声明式管道中使用 "Deploy to container Plugin "插件?
试过这种方式,但什么都没有... 我不明白如何使用行中的参数顺序。
deploy container: tomcat8, url:"http://xxx.xxx.xxx.xxx:8082/", credentialsId: "test", war: 'target/app.war', contextPath: '/app1'
编辑:这是文档:"Deploy to container Plugin "插件在我的声明式管道中的使用。
这是文档。https:/jenkins.iodocpipelinestepsdeploy#deploy-deploy-warear-to-a-container。
编辑2:我尝试_
deploy adapters: tomcat8(url:"http://x.x.x.x:8080/", credentialsId: "asdasd"), war: 'target/app.war', contextPath: '/app'
而我有.NET技术。
java.lang.UnsupportedOperationException: Undefined symbol ‘tomcat8’
at org.jenkinsci.plugins.structs.describable.DescribableModel.resolveClass(DescribableModel.java:448)
at org.jenkinsci.plugins.structs.describable.UninstantiatedDescribable.instantiate(UninstantiatedDescribable.java:165)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:372)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:318)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:259)
Caused: java.lang.IllegalArgumentException: Could not instantiate {adapters=@tomcat8(...
adapters
参数的类型 list
. 您可以检查类型签名 部署到容器上. 以下是正确的语法:
deploy adapters: [tomcat8(url: 'http://localhost:8666/',
credentialsId: 'tomcat')],
war: 'target/*.war',
contextPath: 'app'