drone-config-changeset-conditional icon indicating copy to clipboard operation
drone-config-changeset-conditional copied to clipboard

throw error if no pipeline

Open jimsheldon opened this issue 5 years ago • 5 comments

jimsheldon avatar Oct 10 '19 17:10 jimsheldon

This should fix #14

jimsheldon avatar Oct 10 '19 17:10 jimsheldon

Hi @jimsheldon. Thanks for the contribution. I am not sure this will work though, as this seems to assume that there will only be ONE yaml doc in the drone file. There could be multiple pipelines or even things like:

---
kind: secret

This PR assumes that it will only contain ONE yaml doc, so if you used a secret doc, it would break as you are throwing within a map function

microadam avatar Oct 11 '19 08:10 microadam

Thanks @microadam we will look into this

jimsheldon avatar Oct 11 '19 11:10 jimsheldon

@microadam I pushed a fix that should handle non-pipeline kinds properly

jimsheldon avatar Oct 14 '19 13:10 jimsheldon

Thanks for this! I will try and have a proper look through this soon. I really need to get some unit tests on this project so we can ensure no existing functionality breaks with little changes like this.

microadam avatar Oct 14 '19 18:10 microadam