To set up your CI to expose the information to IDEA, you need to include the following as part of your pipeline script.
Download JFrog CLI, so that it can be used in the pipeline:
curl -fL https://getcli.jfrog.io | sh && chmod +x jfrog
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>
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>
If needed, configure JFrog CLI using the following command.
./jfrog c add
If needed, configure the repositories for your project. For example, if your code is built using maven, run:
./jfrog rt mvnc
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
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.
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
Optionally scan the published build with JFrog Xray by running
./jfrog rt bs
JFrog Pipelines Example
Jenkins Example
GitHub Actions Example