Artifactory

nicolaw 21st August 2020 at 2:16pm
CI/CD Containers GitLab

https://www.jfrog.com/confluence/display/JFROG/S3+Object+Storage

Builds

CLI

REST APIs

Snippets

jfrog rt config
jfrog rt upload
jfrog rt bag # optional, to record Git VCS defailt
jfrog rt bce # optional, to record environment details
jfrog rt bp
curl \
  "-u${artifactory_user}:${artifactory_secret}"
  -XPUT "${artifactory_api}/${artifactory_repo}/${environment}/${rpm##*/}" \
  -T "${rpm}"
curl \
  "-u${artifactory_user}:${artifactory_secret}" \
  -POST "${artifactory_api}/${artifactory_repo}?path=${environment}&async=1"

Extract credentials for command line use:

$ jq -r '.artifactory[]|select(.isDefault == true)|{"ARTIFACTORY_USERNAME":.user,"ARTIFACTORY_PASSWORD":.password,"ARTIFACTORY_URL":.url}|to_entries|map("declare \(.key)=\(.value|tostring|@sh)")|.[]' ~/.jfrog/jfrog-cli.conf
declare ARTIFACTORY_USERNAME='jane.doe'
declare ARTIFACTORY_PASSWORD='grgnghnertgrgj045hjgrelgjewrlg'
declare ARTIFACTORY_URL='https://artifactory.example.com/artifactory/'

Related