Figure 10.41. Copying from a multiconfiguration build
The Copy Artifacts plugin can duplicate any and all of the artifacts produced by this build job. If you
specify a multiconfiguration build as the source of your artifacts, the plugin will copy artifacts from all
of the configurations into the workspace of the target build job, using a nested directory structure based
on the multiconfiguration build axes. For example, if you define the target directory as multi-config-
artifacts, Jenkins will copy artifacts into a number of subdirectories in the target directory, each with
a name corresponding to the particular set of configuration parameters. So, using the build job illustrated
in Figure 10.41, “Copying from a multiconfiguration build”, the JAR file customized for Tomcat and
MySql would be copied to the $WORKSPACE/multi-config-artifacts/APP_SERVER/tomcat/
DATABASE/mysql directory.
10.7.3. Build Promotions
In the world of Continuous Integration, not all builds are created equal. For example, you may want to
deploy the latest version of your web application to a test server, but only after it has passed a number
of automated functional and load tests. Or you may want testers to be able to flag certain builds as being
ready for UAT deployment, once they have completed their own testing.
The Promoted Builds plugin lets you identify specific builds that have met additional quality criteria,
and to trigger actions on these builds. For example, you may build a web application in on build job,
run a series of automated web tests in a subsequent build, and then deploy the WAR file generated to
the UAT server for further manual testing.
Let’s see how this works in practice. In the project illustrated above, a default build job (phoenix-
default) runs unit and some integration tests, and produces a WAR file. This WAR file is then reused
for more extensive integration tests (in the phoenix-integration-tests build job) and then for a
series of automated web tests (in the phoenix-web-test build job). If the build passes the automated
web tests, we would like to deploy the application to a functional testing environment where it can be
tested by human testers. The deployment to this environment is implemented in the phoenix-test-
deploy build job. Once the testers have validated a version, it can be promoted into UAT, and then