View Source

h1. Situation
Set up build for a project to:
# Check out source code from SCM.
# Build and run unit tests.
# Publish generated artifacts, and test reports.
# Label SCM using the build version if the build is successful.
# If failed, notify all commit users.

h1. Demonstration
Visit the [demo project|http://demo.pmease.com/overview/66], and hit the run button to generate the new build. After build finishes, you will see published artifacts as well as junit test reports.

h1. Resolution
# Define next build version at [general setting of the demo project|http://demo.pmease.com/settings/66].
# Switch to [notification setting of the demo project|http://demo.pmease.com/settings/66/notifications]. A notification is defined with receivers set as _<committers since previous build>_ and notification condition set as _if build is failed_.
# Switch to [repository definition of the demo project|http://demo.pmease.com/settings/66/repositories]. A repository is defined according to SCM setting of the project.
# Switch to [step definition of the demo project|http://demo.pmease.com/settings/66/steps]. A sequential composition step is defined as the master step, and below steps are included in the sequential step:
## A checkout step to check out from the repository defined in step 3. The source code will be retrieved into workspace directory of the project as indicated by _destination path_ property of the repository.
## A Maven build step to run package goal. The _build properties_ is defined like below:
{code}
component.version=${build.version}
{code}
With this setting, Maven property _component.version_ will be defined as version of current build, and this property is used as project version in pom.xml.
## A publish artifacts step to publish generated jars and release notes from workspace of the configuration. Reviewing the workspace tab will be helpful when define this step.
## A publish JUnit reports step to publish JUnit xml reports generated by the build. Reviewing the workspace tab will be helpful when define this step.
## A label step to tag SCM using the build version.