IntroductionAssimilating Artifactory into a continuous integration build process is really straight forward - you simply treat The CI server as a regular build client and, as such, The CI server will resolve dependencies from Artifactory and deploy artifacts into a dedicated repository inside Artifactory. The Build Integration feature of Artifactory takes this integration one big step forward, by making Artifactory and your CI server closely integrated to provide fully-reproducible builds and full visibility of deployed artifacts, used dependencies and information about build environment. By using the Build Integration add-on you will:
Hudson and Other CI IntegrationsThough the current Build Integration only supports the Hudson as the CI server, similar integrations with TeamCity and Bamboo, as well as other build technologies stacks, are currently being worked-on - stay tuned.
Setting-up HudsonThe Hudson Plug-inTo integrate with Hudson you will need to install the OSS Artifactory Hudson Plug-in from Hudson's Plug-ins Manager.
Installing and Configuring the Plug-inTo install the Hudson Artifactory plug-in please follow the instructions on Hudson's Plug-in Center.
It is recommended that you also configure Hudson to use Artifactory for dependency resolution. This is not currently part of the plug-in and is done the regular way a Maven build is configured, typically by changing the settings.xml of the user running Hudson. Inspecting and Managing BuildsBuilds and Per-Build HistoryAfter you have run a build in Hudson that deploys to Artifactory, you can immediately see the corresponding build results inside Artifactory. A new 'Builds' menu item lists all known Hudson projects that published their build results: Each build corresponds to its Hudson project (job) counterpart and contains a build history of all runs, that reflect the build history in Hudson:
For each build item in the history you can drill down into and get more fine details about it, as explained in the next section. You can also view the build in Hudson by selecting 'Show in CI Server' and go back to Artifactory from the Hudson UI, as seen below:
Build-level InformationDrilling-down into the single build level, each build contains tree parts of information:
General Build InformationThis section contains general information about the build properties, including other environmental details that are otherwise lost if we want to replay the build in a later point in time (e.g. JDK used, system architecture etc.). It is also from here, that you can save the build's artifacts and/or dependencies as a Smart Search Result, for further manipulation, as we will see later.
Build ModulesEach build publishes module(s) into Artifactory, which are seen on this view, together with the number of artifacts and dependencies which they contain:
Module Artifacts and DependenciesIf we drill even further down, we will be able to inspect each module's published artifacts and dependencies. Note that deployed artifacts are collected with their types, and dependencies contain the scope(s) that the dependencies were used in during the build. You can also go from each item to its tree view in Artifactory and view other details about it.
Generic BuildInfo ViewThe generic BuildInfo view displays an JSON representation of the data that is used to form the visual build information in Artifactory. This can be used by REST or for debugging and is also exposed in the basic OSS version of Artifactory. See towards the end of this chapter for more information about the BuildInfo object.
Exporting and Manipulating Build ItemsFrom the build's general information panel, you can save the build's artifacts and/or dependencies as a Smart Search Result and then manipulate it in order to promote it to another repository, copy it or export all the items to disk to have an external distributable unit of the build with all its dependencies and artifacts.
Repository View of BuildsArtifacts inside Artifactory are also aware of their possible association to builds. When an artifact is associated with a build, either as a published artifact or as a dependency it is visible on a new Builds tab (when selecting the artifact in the tree view).
You can navigate directly from the Builds view to the build information in Artifactory or to the build page in Hudson:
Behind the ScenesBehind the scenes the Hudson plug-in performs two major tasks:
|










Comments (2)
Feb 19
michel morizot says:
hello, just to warn that the buildinfo link is broken : http://repo.jfrog.org/...hello,
just to warn that the buildinfo link is broken :
http://repo.jfrog.org/artifactory/third-party-releases-local/org/jfrog/jfrog-build-info-api/
Feb 23
Yoav Landman says:
Fixed. Thanks!Fixed. Thanks!