buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

Expose BUILDKITE_PARENT_BUILD_ID #387

Closed joscha closed 6 years ago

joscha commented 6 years ago

Currently there is no easy way to get the triggering job of a build unless passing

env:
  PARENT_BUILD_ID: ${BUILDKITE_BUILD_ID}

it would be great to get a generic BUILDKITE_PARENT_BUILD_ID for this.

toolmantim commented 6 years ago

Good suggestion! I'm just wondering if the build UUID is going to be enough? Because the job/build that triggered it could be from any pipeline.

joscha commented 6 years ago

O, I was under the impression that the UUID is all I need to get artifacts from that pipeline for example. I guess more information wouldn't be wrong.

toolmantim commented 6 years ago

Actually I've just done some digging, and I think you're right, all you'll need is the build UUID.

toolmantim commented 6 years ago

BUILDKITE_TRIGGERED_FROM_BUILD_ID is now available 🎉 allowing you to:

buildkite-agent artifact download \
  --build "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" \
  some-artifact.tgz \
  .

The docs will be updated shortly too.

joscha commented 6 years ago

Awesome, thank you!

On Wed., 9 May 2018, 13:05 Tim Lucas, notifications@github.com wrote:

BUILDKITE_TRIGGERED_FROM_BUILD_ID is now available 🎉 The docs will be updated shortly too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/buildkite/feedback/issues/387#issuecomment-387606183, or mute the thread https://github.com/notifications/unsubscribe-auth/AALehiLX-HD47-dLUb13mmssKcr_I61_ks5twl0QgaJpZM4T2Iln .

lox commented 6 years ago

I'm going to close this one!