In several of our pipelines, we need to share an artifact between multiple pipelines or builds. Using the artifact uploader, we can specify a path to upload these artifacts to a deterministic location. However, there is no way to easily download these artifacts without either using the artifact rest api to search and find the the build which originally uploaded the artifact, to then download it - or directly interacting with the GCS apis.
We have currently worked around this by using the GCS rest api directly, but would love to see this workflow supported when using the artifact api.
An arbitrary object can be downloaded from GCS/artifactory/SW3 by setting a
BUILDKITE_ARTIFACT_DOWNLOAD_ORIGIN env var, which mirrors the behavior of
For example, an artifact uploaded using the command:
BUILDKITE_ARTIFACT_UPLOAD_DESTINATION='gs://bucket-name/path/within/bucket' buildkite-agent artifact upload artifact-<hash>.tar.gz would be able to be downloaded using
BUILDKITE_ARTIFACT_DOWNLOAD_ORIGIN='gs://bucket-name/path/within/bucket' buildkite-agent artifact download artifact-<hash>.tar.gz .
Note: A requirement for the solution would be not needing to provide the job id in which the artifact was originally uploaded