Creating a Hudson/Jenkins build definition

You can create a Hudson/Jenkins build definition that links to a Hudson/Jenkins project that is hosted on the Hudson or Jenkins server.

Before you begin

You created a Hudson/Jenkins build engine and a Hudson/Jenkins project, such as a free-style project that runs the Windows dir command through a Windows batch command.

About this task

You can set Hudson/Jenkins build definition options, such as Jazz Source Control or Post-build Deliver. However, the build definition does not automatically run the options. You must configure the Hudson/Jenkins build to run build definition options by using Ant tasks, such as teamAccept and teamFetch, or by using a Hudson/Jenkins plug-in for Engineering Workflow Management.


  1. In the Team Artifacts view, expand the project folder.
  2. Right-click Builds; then click New Build Definition.
  3. In the New Build Definition wizard, on the New Build Definition page, accept the defaults settings and click Next.
  4. On the General Information page, in the Available build templates pane, select Hudson/Jenkins Build, and then click Next.
  5. Optional: If you use source control, on the Pre-build page, select Jazz Source Control and click Next.
  6. Optional: On the Post-Build page, to automatically deliver components to a stream based on build status, select Post-build Deliver and click Next.
  7. On the Additional Configuration page, ensure that all of the options are selected and then click Finish.
  8. In the Build Definition editor, on the Overview page, in the Supporting Build Engines area, click Add.
  9. In the Add Build Engines window, select the appropriate Hudson/Jenkins build engine and click OK.
  10. Click the Hudson/Jenkins tab.
  11. Click Get Jobs, and then define a Hudson/Jenkins job to run.
  12. Optional: To schedule builds:
    1. Click the Schedule tab.
    2. To enable build scheduling, under Schedule, select Enabled.
    3. Click Add.
    4. In the Build Time pane, specify either continuous build intervals in minutes, or a specific build time.
    5. In the Build Days pane, select the days of the week that the build runs.
  13. Optional: If you selected Jazz Source Control on the Pre-build page, make sure that the build definition refers to a dedicated build workspace, rather than a team stream. The build definition must refer to a build workspace, so that builds are isolated from ongoing changes in the stream. To set the build definition to refer to a build workspace:
    1. Click the Jazz Source Control tab.
    2. To specify a repository workspace, in the Build workspace pane, click Create.
    3. In the New Repository Workspace wizard, on the Select a stream page, select Flow with a stream.
    4. In the lower pane, select the repository stream that you want to build from, and then click Next. The repository workspace accepts changes from that stream.
    5. On the New Repository Workspace page, in the Repository Workspace Name field, rename the repository workspace and then click Next.
    6. On the Components to Add page, make sure that your component is selected.
    7. Make sure that the Load repository workspace after creation check box is cleared and then click Finish.
    8. To specify a build user for the build workspace, in the Workspace Owner window, click Open Workspace.
    9. In the Repository Workspace editor, in the Owned by field, browse to the location of your special-purpose build user.
    10. Click Save.
    11. In the Build Definition editor, in the Load Options pane, in the Load directory field, type the path to the directory on the build machine where workspace files are to be loaded.
    12. Optional: To define a subset of component files and folders for the build to load, in the Component load rules field, type the path to the component load rules file.
  14. Click Save.

What to do next

After you start the Hudson/Jenkins build engine, you can request a Hudson/Jenkins build and view the build results.

video icon Video channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community forums library

support icon Support

IBM Support Community
Deployment wiki