Upload pipeline not honoring queue?

For testing purposes I created a new pipeline with a private GitHub repo, using a deploy key of a specific agent I’d like to target instead of the usual GitHub Machine User.

The problem I’m facing is that the initial pipeline upload step before the first defined step in the pipeline.yml doesn’t seem to honor the agent queue - is this expected?

The pipeline upload then fails, because a random agent is selected with queue=default and that one obviously doesn’t have access to the repo, because I used the deploy key of the queue=do-builds agent for access.

Consider this pipeline.yml

agents:
  queue: do-builds

steps:
  - label: 'Validate :packer: & build :packer:'
    command:
      - cd packer && \
          packer validate -var-file=variables-ci.json buildkite-image.json && \
          packer build -var-file=variables-ci.json buildkite-image.json

Is there a way to set the agent queue for the initial pipeline upload step?

Pipeline Settings -> Steps -> Legacy Steps -> (Find the upload step) -> Agent Targeting Rules

1 Like

Thank you, you made my day!