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
Silent failure when yaml parsing error #672
Comments
Can you verify that we correctly logged an error message? If yes, we can just alter that line of code to update the commit as failed and then to exit. |
@bradrydzewski yes, this what I got in log file:
To be more specific, line in script caused this: script:
- [ $CI_BRANCH -eq "master" ] && npm run release |
OK great, just wanted to make sure that line triggered an error message. Instead of logging to the console we can write the error to the build output, mark the build as |
You could do something like this. create a file
then in your
|
Thanks for the quick reply and the complete example, that worked perfectly for me. Of course it would be cleaner if drone didn't trigger other branches but I appreaciate the workaround. (Didn't realize $DRONE_BRANCH was already defined by default either, that's also handy to know). Thanks again for this really excellent project. |
another example that might help specifically with deployment and publishing is the image: gcc
script:
- make
- make test
deploy:
bash:
script:
- make deploy
when:
branch: master The above approach works well if you want to limit deployments to a single branch (ie master). The approach, however, falls short if you want to run a different deployment script for each branch (ie master, staging). In this case you'll definitely want to use the approach suggested by @kylewelsby until we get #696 resolved. |
Error: missing Docker image
on invalid yaml
I just hit this today actually, but the error was not printed in the server log and I only saw it while sniffing network traffic:
(and for additional context this repo had no builds yet, so whatever solution is used, it should be able to handle that scenario too) |
fixed in 0.6 |
@bradrydzewski did you mean |
I introduced an 0.6 tag since I needed to make a breaking change to the agent <> server communication, and didn't want to impact existing 0.5 installs. I will post to the discourse forum and gitter once it is safe to upgrade to 0.6 |
If
.drone.yml
is malformed misguiding error will be printer.The text was updated successfully, but these errors were encountered: