Set up steps
Step 1 - Configuring Your CI Pipeline to record and publish build-info to JFrog Artifactory
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:
Set the following environment variables with the build name and build run number.
Set the following environment variable, with the URL to the pipeline log on the CI.
If needed, configure JFrog CLI using the following command.
If needed, configure the repositories for your project. For example, if your code is built using maven, run:
Run the command that builds your code using JFrog CLI. For example, if your code is built using maven, run:
Set the following environment variable, to indicate that the build finished successfully.
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.
Optionally scan the published build with JFrog Xray by running
JFrog Pipelines Example
GitHub Actions Example
This example uses the setup-jfrog-cli GitHub Action, which already sets the JFROG_CLI_BUILD_NAME, JFROG_CLI_BUILD_NUMBER and JFROG_CLI_BUILD_URL behind the scenes.
Step 2 - Creating a JFrog Platform user to be set in IDEA
Follow these steps to create a JFrog Platform user for IntelliJ IDEA. The user will have limited permissions, which only allows viewing the CI information inside IDEA.
Make sure JFrog CLI is installed on your local machine by running
If it is not installed, install it.
Run the following command to create a Users Group in the JFrog Platform. We'll use the name ide-developers for the Group. Feel free to choose a different name.
Run the following commands to create a Permission in the JFrog Platform. We'll use the name ide-developers-perm for the Permission. Feel free to choose a different name. Notice that the Group name we created is also included in the following commands.
Create the JFrog Platform user by running the following command, after replacing the <username>, <password> and <email> tokens. Notice that the Group name we created is also included in the following command.