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 (support@buildkite.com)?
Hey Aron
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:
env:
BUILDKITE_ARTIFACT_UPLOAD_DESTINATION: "your/custom/destination/*"
steps:
- label: ":pipeline: Validate and Upload Pipeline"
command:
- 'buildkite-agent pipeline upload pipeline.yml'
agents:
queue: Hosted_Agents
Alternatively, you can consider uploading artifacts with a command step.
Cheers,
Athreya
OH - this could solve it.
I’m just trying to do this:
steps:
- 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/*'
plugins:
- docker#v5.11.0:
image: docker.io/bacalhauproject/build-container:0.0.32