In the above example we are uploading and downloading generic files. as follows
tools { jfrog 'jfrog-cli-latest' }
Means that we are defining a new tool called jfrog-cli-latest to download it from release.jfrog.io, which is going to be defined in the coming section.
Next we will start by defining a stage in Jenkins, which is a Testing stage, and then inserting commands which are JFrog CLI commands. Each command has a description besides it
stages { stage ('Testing') { steps { #Show the version of JFrog CLI used jf '-v' #Show the configuration used to connect to JFrog Platform jf 'c show' #in this command we are pinging the artifactory to see if it is alive jf 'rt ping' #In this command we are creating a new file sh 'touch test-file' #In this command we are adding the new file created previously inside the my- repo repository jf 'rt u test-file my-repo/' #Publish the build-info into Artifactory. jf 'rt bp' #Download the test-file jf 'rt dl my-repo/test-file' } } } }