不能在 Jenkins 中使用 "Deploy to container plugin"

Cannot use "Deploy to container plugin" in Jenkins

我想通过 jenkins 将 java maven webapp 部署到本地 tomcat8。我发现我需要安装 "Deploy to container plugin",我已经安装了。

我想,现在我应该能够在我的管道配置中添加一个 post-build 操作。 (如此处所述:

但是在我的管道的 "configure" 下没有显示 "post build action" 的选项卡(我也没有构建选项卡,我在几个屏幕截图上看到了)。在研究之后,我添加了一些在一些教程中描述的插件,比如 "Hudson Post build task" 和 "PostBuildScript Plugin" 但这并没有改变任何东西。

我是不是漏掉了某个特定的插件,还是有其他问题?

提前致谢!

如果您使用的是 'Pipeline' 类型的作业(不是那些 'PostBuildScript plugin' 所指的 'Freestyle' 类型),您需要在 [=16] 中执行上述操作=] 管道的一部分:

pipeline {
  agent
  ...
  stages {
    ...
  }
  post {
    PUT YOUR CODE HERE!!!
  }
}