Running preflight builds

You can run test builds in your production build environment without impacting your production environment, using a preflight build. Preflight builds allow you to build code that has not been merged into your production code to determine if the build completes correctly.

A preflight build is like a regular build life, allowing you to test a build before committing code changes to the source control. The preflight build includes a clean-up service that deletes preflight build older than thirty days. This prevents the accumulation of test builds using server storage.

A preflight build cannot be specified as a dependency for either a regular or another preflight build. Because it can never be a dependency for any other build, it is always safe to delete.

To use this feature, you must download the Preflight client on any computer that can communicate with the UrbanCode Build server.

  1. In the UrbanCode Build user interface click Tools on the taskbar and select the Preflight package to download the preflight client.
  2. Go to the location of the package that you downloaded and decompress the package. The build executable is in the /bin directory.
  3. Start a preflight build using a command line interface as shown in the example below. In the example, a preflight build is started for the project with an ID of 1423 and build process number 52. The user ID and password are included in the command to authentication with the build server.
    preflight build --url http://localhost:8080 --local-server-host localhost -p 1423 -bp 52 
    -D workspace.revision.6df88f60-0ed2-4da2-8fcc-12fd779d8bfa=cf5cf4a6a185b523fa2d80cf3356981a759a441c 
    --user PasswordIsAuthToken --password 31e3dcc9-96d5-4640-98f6-0583a6928355
    --url
    Fully-qualified URL of the UCB server
    --local-server-host
    Local name of the UCB server. The value is usually localhost.
    -p
    The ID of the project.
    -bp
    The ID of the build process.
    -D
    Properties to include with the build. Specify the workspace.revision.uniqueID property for the build to use a specific code commit. This property contains information from the Populate Workspace step to identify the correct code to use. If a value for the property has not been set, the latest commit is used and the property is set to the latest commit unique ID value.
    --user
    The user ID to log into the IBM® UrbanCode™ Build server.
    --password
    The password associated with the user ID.
After the build completes, view the output information to verify that the build completed successfully. Below is sample of a Preflight build output.
Request URL:
        http://localhost:8080/tasks/project/BuildRequestTasks/viewBuildRequest?buildRequestId=463Request Status:
        SubmittedRequest Status:
        BUILD_LIFE_CREATED
        Buildlife URL: http://localhost:8080/tasks/project/BuildLifeTasks/viewBuildLife?buildLif eId=386
        Build Status:  RUNNING
        Build Status: FAILED

Notice that the Build Status field indicates that the preflight build failed. The error should be investigated and fixed before merging into the production code. The link in the Buildlife URL field provides additional information about the failure.

You can continue using the preflight build testing iterations of the code until a successful build occurs.