Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw error if no pipeline #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

throw error if no pipeline #17

wants to merge 2 commits into from

Conversation

jimsheldon
Copy link

No description provided.

@jimsheldon
Copy link
Author

This should fix #14

@microadam
Copy link
Owner

microadam commented Oct 11, 2019

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

@jimsheldon
Copy link
Author

Thanks @microadam we will look into this

if 'kind' is undefined, the config could be 0.8 syntax, so return a 204 and let
the drone server retrieve it

if 'kind' is anything other than 'pipeline', return it
@jimsheldon
Copy link
Author

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

@microadam
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants