Configure Your CI Pipeline to record and publish build-info to JFrog Artifactory

JFrog Integrations Documentation

ft:sourceType
Paligo

To set up your CI to expose the information to IDEA, you need to include the following as part of your pipeline script.

  1. Download JFrog CLI, so that it can be used in the pipeline:

    curl -fL https://getcli.jfrog.io | sh && chmod +x jfrog
  2. Set the following environment variables with the build name and build run number.

    export JFROG_CLI_BUILD_NAME=<the build name>
    export JFROG_CLI_BUILD_NUMBER=<the build run number>
  3. Set the following environment variable, with the URL to the pipeline log on the CI.

    export JFROG_CLI_BUILD_URL=<url to the pipeline log>
  4. If needed, configure JFrog CLI using the following command.

    ./jfrog c add
  5. If needed, configure the repositories for your project. For example, if your code is built using maven, run:

    ./jfrog rt mvnc
  6. Run the command that builds your code using JFrog CLI. For example, if your code is built using maven, run:

    ./jfrog rt mvn clean install
  7. Set the following environment variable, to indicate that the build finished successfully.

    export JFROG_BUILD_STATUS=PASS

    Make sure to set the environment variable's value to FAIL, to indicate a failure of the CI pipeline.

  8. Record the environment variables and the project's git information as part of the build-info and then, publish the build-info to Artifactory. Make sure your pipeline always executes these commands, even in the case of a failure.

    ./jfrog rt bce
    ./jfrog rt bag
    ./jfrog rt bp
  9. Optionally scan the published build with JFrog Xray by running

    ./jfrog rt bs

JFrog Pipelines Example

Jenkins Example

GitHub Actions Example