Lesson 6: Creating a project

You use projects to configure and run builds. After a build runs, projects provide a wealth of information that you can use to manage the project lifecycle and troubleshoot problems.

Ensure that you completed all of the preceding steps before you start this lesson.
Projects are built from templates. In this lesson, you will use the templates that you made earlier to create the tutorial project. You can run builds automatically on a predetermined schedule, or you can run builds manually, as you do in the tutorial. To define the tutorial project, you select the process that you defined earlier. When you start the build, the workflow begins running the job that you created with the job template. The project determines the source code to use, and manages any dependencies. Each build generates a unique build life ID.
  1. On the left navigational panel, click Projects, and then click Create.
  2. Select the project template that you created in Lesson 3, Demo Project Template.
  3. In the Name field, type Demo Project.
  4. Click Save.

Configuring the project build process

A project must be associated with a build process. A project might have any number of build processes associated with it.

  1. Ensure that the Configuration tab for the Demo Project project is displayed, then, under Build Processes, click New.
  2. In the Template list, select Demo Build Process, and then click Select.
    The Maven Goals field is derived from the process template that you created in last lesson.
  3. In the Name field, type Demo Build.
  4. In the Maven Goals field, accept the value, package.
    The package value is a basic Maven lifecycle build phase. The package attribute instructs Maven to put the compiled code into a distributable format, such as a JAR file. You can use the tutorial project to run other Maven builds and change the goals.
  5. Click Save.
The Configuration tab for the new build process is displayed.

Configuring the project source

A project's build source is defined by assigning a source template to a build configuration.

Ensure that the Configuration tab for the build process you defined in the previous section is displayed.
You define the source configuration by selecting the source template that you created earlier, and by using template properties to identify the source location.
  1. Under Source Configuration, click Create.
  2. In the Source Template list, select the source template that you created earlier, GitHub, and then click Select.
  3. In the Name field, type GitHub.
  4. In the Repository list, select the repository that you created earlier, demoHub.
  5. In the Git Project Path field, type junit.
    Because the project uses the master branch, you can leave the Git Branch field blank.
  6. Click Save.
With the build process defined and the build source identified, the project is complete. The finished Demo Build process is shown in the following figure:
The finished Demo Build process

Lesson checkpoint

In this lesson, you created a project and defined a build process and build source.

The project is constructed from the templates you made earlier in the tutorial. All projects are built from templates; when you create a project, you identify the templates and provide property values for them. A project can inherit properties from any of the templates used in the project.