Help documentation

Pipeline Templates

Templating helps to create reusable workflows in order to make tasks like creating and maintaining branches, and managing large number of pipelines easier

Branching Example

Assuming we have the following pipeline defined

<pipelines group="my-app">
  <pipeline name="trunk">
    <materials>
      <svn url="http://my-svn-url/trunk" />
    </materials>
    <stage name="build">
      <jobs>
        <job name="compile">
          <tasks>
            <ant target="compile" />
          </tasks>
        </job>
      </jobs>
    </stage>
  </pipeline>
</pipelines>

When I create branch 1.0, templating simplifies the config file

<pipelines group="my-app">
  <pipeline name="trunk" template="my-app-build">
    <materials>
      <svn url="http://my-svn-url/trunk" />
    </materials>
  </pipeline>
  <pipeline name="1.0-branch" template="my-app-build">
    <materials>
      <svn url="http://my-svn-url/branches/1.0" />
    </materials>
  </pipeline>
</pipelines>
<templates>
  <pipeline name="my-app-build">
    <stage name="build">
      <jobs>
        <job name="compile">
          <tasks>
            <ant target="compile" />
          </tasks>
        </job>
      </jobs>
    </stage>
  </pipeline>
</templates>
See also...