Created
October 17, 2018 12:40
-
-
Save kumbasar/f266ff0fdb533b3defd0aaeb7ee7339a to your computer and use it in GitHub Desktop.
Copy a repo from Artifactory to another Artifacory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export JFROG_CLI_OFFER_CONFIG="false" | |
source_folder_name="abc" | |
source_url="http://<SOURCE_URL>:8081/artifactory" | |
source_user="" | |
source_password="" | |
target_folder_name="blablabla" | |
target_url="https://<TARGET_URL>:443/artifactory" | |
target_user="" | |
target_password="" | |
rm -rf $source_folder_name || true | |
# Download jforg cli | |
curl -fL https://getcli.jfrog.io | sh | |
# Copy source folder | |
./jfrog rt dl --user "${source_user}" --password "${source_password}" --url $source_url $source_folder_name/* | |
# Upload to target folder | |
mv $source_folder_name/ $target_folder_name/ | |
#./jfrog rt del --user "${target_user}" --password "${target_password}" --url "${target_url}" "${target_folder_name}/*" | |
./jfrog rt u --flat="false" --user "${target_user}" --password "${target_password}" --url "${target_url}" "${target_folder_name}/*" "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment