Using Hosted Storage with Hosted Agents

I’d like to use hosted agents, but according to the documentation (Buildkite Agent hooks v3 | Buildkite Documentation) i’m not able to set the artifact destination with an environment variable. How should I set this up?

Hello @aronchick,

Could you please share an example (YAML content) of what you’re trying to implement?

If you’ve already tried in a build, could you please share a link to it, via email (

Hey Aron :wave:

Thanks for reaching out to us! Jumping in for Yann with a few thoughts.
As the compute of the hosted agents is with us, this limits the use of hooks at agent level (and environment variables within the hooks). I think the best way to set BUILDKITE_ARTIFACT_UPLOAD_DESTINATION would be to set this within the piepline or steps . If you use Pipline steps, you can directly define it in the pipline steps:

  BUILDKITE_ARTIFACT_UPLOAD_DESTINATION: "your/custom/destination/*"

  - label: ":pipeline: Validate and Upload Pipeline"
      - 'buildkite-agent pipeline upload pipeline.yml'
      queue: Hosted_Agents

Alternatively, you can consider uploading artifacts with a command step.


OH - this could solve it.

I’m just trying to do this:

  - name: Build WebUI
    commands: |
      git checkout aronchick-buildkite
      export SHELL=$(which bash)
      FLOX_DISABLE_METRICS=true flox activate -r "aronchick/bacalhau" -t -- just build-webui
      FLOX_DISABLE_METRICS=true flox activate -r "aronchick/bacalhau" -t -- buildkite-agent artifact upload 'webui/build/*;webui/node_modules/*'
      - docker#v5.11.0: