Skip to content
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

fix: fix deploy artifacts in folders with checksum #184

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,14 @@ artifact = art.artifacts.deploy("<LOCAL_FILE_LOCATION>", "<ARTIFACT_PATH_IN_ARTI
artifact = art.artifacts.deploy("<LOCAL_FILE_LOCATION>", "<ARTIFACT_PATH_IN_ARTIFACTORY>", checksum_enabled=True)
# artifact = art.artifacts.deploy("Desktop/myNewFile.txt", "my-repository/my/new/artifact/directory/file.txt", checksums=True)
```
Note: the performance might suffer when deploying artifacts with checksums enabled.
Deploy an artifact to the specified destination by checking if the artifact content already exists in Artifactory.

If Artifactory already contains a user-readable artifact with the same checksum the artifact content is copied over
to the new location and returns a response without requiring content transfer.

Otherwise, a 404 error is returned to indicate that content upload is expected in order to deploy the artifact.

**Note**: The performance might suffer when deploying artifacts with checksums enabled.

#### Download an artifact
```python
Expand Down
2 changes: 1 addition & 1 deletion pyartifactory/objects/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def deploy(
for root, _, files in os.walk(local_file.as_posix()):
new_root = f"{artifact_folder}/{root[len(local_file.as_posix()):]}"
for file in files:
self.deploy(Path(f"{root}/{file}"), Path(f"{new_root}/{file}"))
self.deploy(Path(f"{root}/{file}"), Path(f"{new_root}/{file}"), checksum_enabled)
else:
if checksum_enabled:
artifact_check_sums = Checksums.generate(local_file)
Expand Down
Loading