Repository Check

ARTIFACTORY: How to check if config migration was successful

AuthorFullName__c
Andrew Roellig
articleNumber
000005890
ft:sourceType
Salesforce
FirstPublishedDate
2023-10-13T18:20:30Z
lastModifiedDate
2023-10-13
VersionNumber
3
1. Get two lists of repository keys, one for on-prem and one for SaaS
# Self Hosted Artifactory Repositories List
curl -u <username> <jfrogurlSelfHosted>/artifactory/api/repositories | grep "key" > on-prem-artifactory.json
                        
  # Cloud Artifactory Repositories List
curl -u <username>:<password> <jfrogurlSaaS>/artifactory/api/repositories | grep "key" > cloud-artifactory.json

2. Sort the outputs, these two commands will make separate "sorted" JSON files:
sort on-prem-artifactory.json > on-prem-artifactory-sorted.json

sort cloud-artifactory.json > cloud-artifactory-sorted.json

3. "diff" the two sorted files
diff on-prem-artifactory-sorted.json cloud-artifactory-sorted.json

If the diff command returns no results, it means the repositories are exactly the same for both SaaS and Self Hosted.