Rational Build Forge and JFrog Artifactory

BuildForge can work with Artifactory JFrog for build artifact upload.

Build Forge runs a build automation commands in the application server to generate software package build and deliver. The Build Forge agents deployed across various platforms may be producing builds of the respective software applications, modules or entire software packages. These builds are generated in the form of binary packages that are considered as artifacts. The Build Forge users across software assembly line would intend to securely store these artifacts generated in a repository and to be able to retrieve in real-time on the build forge agent machine.

Build Forge offers a capability to integrate with the Artifactory Repository Manager for processing the build artifacts. The Artifactory Repository Manager is a 3rd-Party artifacts management application by JFrog, that facilitates seamless management of binary artifacts produced by different Build tools such as Build Forge etc.

The Build Forge customers can leverage the capabilities of the Artifactory Repository Manager by integrating it with the Build Forge.

Prerequisite

  • A hosted and running Artifactory Repository Manager should be available.
  • The cURL command must be available on the Build Forge Agent machine where upload and download is to be performed.

Creating Environment Variables

Environment variables are set of dynamic values that runs the uploading and downloading process of artifacts from Build Forge to Artifactory and vice-verse. You must define these environment variables in the Build Forge with the variable name pointing to artifactory repository locations.

To create Environment Variables.
  1. Login to Build Forge and navigate to the Console tab.
  2. On the left pane, select Environments.

    The Environment page is displayed. In this page, you will be creating a new Environment and add the environment variables for integrating Build Forge with Artifactory.

  3. Click Add Environment to create a new environment. Or By default, the New Environment page is available at the lower bottom of the page for creating a new environment.
  4. In the Name box, type an appropriate name for the integration environment.
  5. Click Save Environment. The newly added environment page is displayed.
  6. Click Add Environment Variable. The new environment variable page is available at the lower bottom of the page.
  7. Under the new environment, create each environment variable as illustrated in the following table.

    Variable Name

    Value

    Action On Project

    ARTIFACTORY_URL

    IP address of the Artifactory server.

    For example: http://<<IP Address>>/artifactory.

    Default Default

    ARTIFACTORY_REPO

    Name of the repository in the Artifactory, where you upload/download the binary files.

    For example: project libraries

    Default Default

    ARTIFACTORY_USER

    The user credentials having access privilege to Artifactory repository.

    For example: Admin

    Default Default

    ARTIFACTORY_PASSWORD

    Required. Password to login and access Artifactory repository.

    Assign Hidden Default

    ARTIFACTORY_SOURCE_FILE_PATH

    Artifactory source file location (Path) from where the library files are uploaded to Artifactory repository. You can dynamically change this repository location during upload.

    Default Default

    ARTIFACTORY_TARGET_FILE_PATH

    Specific target location in the repository of the Artifactory application where the artifacts is intended to be uploaded/downloaded. You can dynamically change this repository location during upload or download process.

    Default Default
    ARTIFACTORY_DOWNLOAD_PATH The location on your system where you want to download an artifact from the Artifactory. Default Default

Uploading and Downloading Artifacts

Artifact upload and download can be performed by executing dot commands in the Build Forge application. In a project, while creating step, ensure to select the Artifactory environment from the Environment drop-down list to upload or download the artifacts files by running the following commands:

  • Upload command .artifactupload
  • Download command .artifactdownload
Note: Build Forge does not limit the size of artifacts upload. For information about JFrog Artifactory file upload size limit, refer https://jfrog.com/knowledge-base/does-artifactory-limit-the-file-upload-size-when-uploading-using-the-rest-api
Important: Before you trigger artifact upload or download command, you can dynamically change the artifact path (upload or download location) in the step using the .bset commands. For example:

.bset env "ARTIFACTORY_TARGET_FILE_PATH=builds/$BF_TAG"

.bset env “ARTIFACTORY_SOURCE_FILE_PATH=$BF_ROOT/$BF_TAG.zip”

.artifactupload