Review a sample CLI project

ARTIFACTORY: How to Use JFrog CLI in Jenkins Using JFrog Plugin

AuthorFullName__c
Afeef Khateeb
articleNumber
000005814
ft:sourceType
Salesforce
FirstPublishedDate
2023-07-13T10:17:31Z
lastModifiedDate
2023-07-13
VersionNumber
8


Once the connection is set, we will start adding builds, and inside the builds we will add the JFrog CLI command to control JFrog Platform

  • From the main page, click on New Item 

User-added image

Insert a new name for the item, in our case we can insert JFrog-CLI, and select Pipelines, then click on OK.  
Once the Build is added, scroll down to reach Pipeline section 

User-added image

  • Here we will insert the following commands 
pipeline{
    agent any
    tools {
        jfrog 'jfrog-cli-latest'
    }
    stages {
        stage ('Testing') {
            steps {
                jf '-v' 
                jf 'c show'
                jf 'rt ping'
                sh 'touch test-file'
                jf 'rt u test-file my-repo/'
                jf 'rt bp'
                jf 'rt dl my-repo/test-file'
            }
        } 
    }
}