buildkite / feedback

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

Environment variable for the last green build on the same branch 🦄 #269

Open therealbnut opened 7 years ago

therealbnut commented 7 years ago

If we had an environment variable, like BUILDKITE_LAST_GREEN_COMMIT then we could use it to reliably run diff based CI.

Currently it's possible to have untested skipped builds, or builds that failed. In these cases the diff for the current commit is insufficient to know what needs to be tested.

Ideally the "last" green commit is chronological based on the commit date, not just the order the builds were added.

If there is no green commit on the current branch then it's possible to go through the commit history, alternatively it would be fine for the environment variable to not be set/present.