0

Is there an easy way to setup the Git Publisher in Jenkins to check for multiple builds before pushing code from either? For example, we have a C++ and a J2EE codebase that we build nightly - if these two get out of sync, we have environment issues.

Is there a way that we can use the Git Publisher plugin to check for two successful builds prior to merging the code for those streams?

For example, we have origin/int and origin/dev - we push to origin int, have Jenkins build based off this branch, and if successful we merge to dev. However, the way it's currently setup is that either C++ or J2EE can build successfully while the other fails, and that stream will still get pushed. I.e.,:

  • J2EE Origin/Int -> build succeeds -> merge to Origin/dev

  • C++ Origin/Int -> build fails -> don't merge to Origin/dev

  • Developers then rebase both streams, only now the C++ stream is out of date.

4

1 回答 1

0

我认为 git 发布者不可能做到这一点。但是您可以通过使用中间 git 分支和第三份工作来解决它:

  • J2EE Origin/Int -> 构建成功 -> 合并到 Origin/jenkins_built
  • C++ Origin/Int -> 构建失败 -> 不要合并到 Origin/jenkins_built
  • 合并作业:如果两者都成功 -> 将两个 jenkins_built 合并到 dev

您可能希望使用Join PluginBuild Flow仅在两个集成构建都通过时才运行 Merge Job。

于 2013-08-13T22:42:01.553 回答