deploy_file fails with "Unsupported archive extension" when specifying parameters and explode_archive=True
When running the below reproducer, I see the following output:
pytb
Traceback (most recent call last):
File "reproducer.py", line 13, in <module>
artifactory_path.deploy_file(
File "/home/dwatkins/foss/artifactory/artifactory.py", line 1723, in deploy_file
target.deploy(
File "/home/dwatkins/foss/artifactory/artifactory.py", line 1689, in deploy
return self._accessor.deploy(
File "/home/dwatkins/foss/artifactory/artifactory.py", line 1037, in deploy
raise RuntimeError(text)
RuntimeError: {
"errors" : [ {
"status" : 500,
"message" : "Unsupported archive extension: 'tar.architecture=amd64'; nested exception is java.lang.IllegalArgumentException: Unsupported archive extension: 'tar.architecture=amd64'"
} ]
}
py
import os
import subprocess
from artifactory import ArtifactoryPath
# Create a tarball to explode
subprocess.check_call(["touch", "test-file"])
subprocess.check_call(["tar", "cf", "test.tar", "test-file"])
artifactory_path = ArtifactoryPath(
os.environ["ARTIFACTORY_URL"], apikey=os.environ["ARTIFACTORY_API_KEY"]
)
artifactory_path.deploy_file(
"test.tar", explode_archive=True, parameters={"deb.architecture": "amd64"}
)