-
Notifications
You must be signed in to change notification settings - Fork 54
Update move and copy commands target path description #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,7 +216,7 @@ This command is used to copy files in Artifactory | |
| Abbreviation | rt cp | | ||
| Command arguments | <p>The command takes two arguments source path and target path.<br><br>In case the --spec option is used, the commands accept no arguments.</p> | | ||
| Source path | Specifies the source path in Artifactory, from which the artifacts should be copied, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | | ||
| Target path | <p>Specifies the target path in Artifactory, to which the artifacts should be copied, in the following format: <code>[repository name]/[repository path]</code><br><br>If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be copied. If there is no terminal slash, the target path is assumed to be a file to which the copied file should be renamed. For example, if you specify the target as "repo-name/a/b", the copied file is renamed to "b" in Artifactory.<br><br>For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to <a href="https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/using-placeholders">Using Placeholders</a>.</p> | | ||
| Target path | <p>Specifies the target path in Artifactory, to which the artifacts should be copied, in the following format: <code>[repository name]/[repository path]</code><br><br>By default the Target Path maintains the source path hierarchy, see --flat flag for more info. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be copied. If there is no terminal slash, the target path is assumed to be a file to which the copied file should be renamed. For example, if you specify the target as "repo-name/a/b", the copied file is renamed to "b" in Artifactory.<br><br>For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to <a href="https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/using-placeholders">Using Placeholders</a>.</p> | | ||
| Command options | <p>When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.</p> | | ||
| --server-id | <p>[Optional]<br>Server ID configured using the config command. If not specified, the default configured Artifactory server is used.</p> | | ||
| --spec | <p>[Optional]<br>Path to a file spec. For more details, please refer to <a href="https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/using-file-specs">Using File Specs</a>.</p> | | ||
|
@@ -264,6 +264,13 @@ Copy all artifacts located under **/rabbit** in the **source-frog-repo** reposit | |
jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --props=Version=1.0 | ||
``` | ||
|
||
#### Example 4 | ||
|
||
Copy all artifacts located under /rabbit in the **source-frog-repo** repository to an absulote path. | ||
``` | ||
jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --flat | ||
``` | ||
|
||
## Moving Files | ||
|
||
This command is used to move files in Artifactory | ||
|
@@ -281,7 +288,7 @@ This command is used to move files in Artifactory | |
| Abbreviation | rt mv | | ||
| Command arguments | <p>The command takes two arguments source path and target path.<br><br>In case the --spec option is used, the commands accept no arguments.</p> | | ||
| Source path | Specifies the source path in Artifactory, from which the artifacts should be moved, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | | ||
| Target path | <p>Specifies the target path in Artifactory, to which the artifacts should be moved, in the following format: <code>[repository name]/[repository path]</code><br><br>If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be moved. If there is no terminal slash, the target path is assumed to be a file to which the moved file should be renamed. For example, if you specify the target as "repo-name/a/b", the moved file is renamed to "b" in Artifactory.<br><br>For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to <a href="https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/using-placeholders">Using Placeholders</a>.</p> | | ||
| Target path | <p>Specifies the target path in Artifactory, to which the artifacts should be moved, in the following format: <code>[repository name]/[repository path]</code><br><br>By default the Target Path maintains the source path hierarchy, see --flat flag for more info. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be moved. If there is no terminal slash, the target path is assumed to be a file to which the moved file should be renamed. For example, if you specify the target as "repo-name/a/b", the moved file is renamed to "b" in Artifactory.<br><br>For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to <a href="https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/using-placeholders">Using Placeholders</a>.</p> | | ||
| Command options | <p>When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.</p> | | ||
| --server-id | <p>[Optional]<br>Server ID configured using the config command. If not specified, the default configured Artifactory server is used.</p> | | ||
| --spec | <p>[Optional]<br>Path to a file spec. For more details, please refer to <a href="https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/using-file-specs">Using File Specs</a>.</p> | | ||
|
@@ -329,6 +336,14 @@ Move all artifacts located under **/rabbit** in the **source-frog-repo** reposit | |
jf rt mv "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --props=Version=1.0 | ||
``` | ||
|
||
#### Example 4 | ||
|
||
Move all artifacts located under /rabbit in the **source-frog-repo** repository to an absulote path. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it's a bit hard to understand from the example description what the desired outcome is, I suggest adding a "before" and "after" example that demonstrates the outcome. Also, I'm not sure "to an absolute path" isn't fully clear, so I suggest rephrasing the entire description. |
||
|
||
``` | ||
jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --flat | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "cp" here should probably be replaced with "mv". |
||
``` | ||
|
||
## Deleting Files | ||
|
||
This command is used to delete files in Artifactory | ||
|
@@ -612,4 +627,4 @@ Remove the properties 'component', 'layer' and 'level' from files in the docker- | |
|
||
``` | ||
jf rt delp "docker-hub/*" "component,layer,level" | ||
``` | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's a bit hard to understand from the example description what the desired outcome is, I suggest adding a "before" and "after" example that demonstrates the outcome. Also, I'm not sure "to an absolute path" isn't fully clear, so I suggest rephrasing the entire description.