4

We would like to set up Continuous Integration and Continuous Deployment processes on the base of Jenkins ecosystem. Currently we're trying to put together all the Jenkins build jobs we have (from sources to several endpoint processes launched on the testing server). There are three kinds of build/deployment processes in our case:

  1. Building deb packages from C++ projects (some of them are dependent, others are dependencies);
  2. Building images from Docker containers;
  3. Launching some processes in the endpoint;

enter image description here

As you can notice, we faced with a heavily branched chain of jobs triggered by each other. And every update of any of the upstream projects must go throughout the chain of jobs and trigger the final job (process I). So It would be nice to use some kind of Jenkins plugins that will:

  • Control such a complicated structure of jobs (I tried to use Build Pipeline Plugin and I got the impression that this tool is suitable for "linear" job chain);
  • Provide clean way of passing the parameters between job environments.
4

2 回答 2

3

正如@slav 提到的,Workflow 插件应该能够处理这种复杂的控制流,包括子任务的并行处理、整个过程中变量的简单处理(只是 Groovy 局部变量)和Docker 支持

您当然可以将整个过程安排在一个单一的build.gradle(或Makefile就此而言)。如果您不介意在同一个 Jenkins 从站上运行所有步骤,并且不需要在构建过程中以任何特定方式与 Jenkins 交互或向 Jenkins 报告,那将是合适的。

于 2015-06-04T17:15:16.207 回答
2

好吧,对于传递参数,您应该使用Parameterized Trigger Plugin

对于更异步的参数传递,您可以使用EnvInject 插件(它对于各种事情都非常有用和灵活,并且考虑到您的复杂性,无论您是否使用它来传递参数都可能证明是有用的)

至于控制,研究工作流插件。它允许在自己的 Groovy 脚本中编写整个执行流程,并具有精细的控制。更多链接:
官方 - https://jenkins-ci.org/content/workflow-plugin-10
教程 - https://github.com/jenkinsci/workflow-plugin/blob/c15589f/TUTORIAL.md#pausing-flyweight-与重量级执行者

于 2015-05-28T16:32:42.037 回答