Prerequisites

ARTIFACTORY: How to install the JFrog CLI and perform the CLI operations on a Hosted Linux Agent using JFrog CLI tool installer task in Azure DevOps Pipelines

AuthorFullName__c
Manuchandran P
articleNumber
000006026
ft:sourceType
Salesforce
FirstPublishedDate
2024-02-04T09:18:04Z
lastModifiedDate
2024-02-04T09:36:48Z
VersionNumber
2
JFrog Azure DevOps Pipeles integrated with JFrog platform.
We need to configure the JFrog Azure DevOps extension as mentioned in this document

Once the extension is installed and connected to the Artifactory instance, next step is to setup the Linux Agent pools ( Self hosted Agents ).

Please follow the below instructions to add Linux Agents:
  • Add the agent using the “Add pool” option

User-added image

  • Select the “Self-hosted” and provide a name to the agent pool

User-added image

  • Once the agent pool is created. Please click on the pool and add the new agent under the agent tab.

User-added imageUser-added image

  • Click on the “New agent” tab and follow the installation instructions for the Linux agent on the Linux machine.

User-added image

  • Configure the agent using the ”config.sh” script. Provide the server URL like “https://dev.azure.com/{your-organization}” and also provide the access token from Azure.

User-added image

  • Once configured, use the “run.sh” script to start the agent.

User-added image

  • Then check the agent status under the agent pool. Once connected successfully, agents are available online  under the agent pool.

User-added image

  • Next, we can use this agent for running the CLI installer task by adding the agent pool name in the pipeline script.
User-added image
  • Below is the sample CLI installer task to install the CLI and execute the Jfrog CLI command.

User-added image

  • Finally, once the build is triggered, CLI will be installed on the Linux agent and can execute all the CLI commands as per the pipeline script.

User-added image