Build stages and after_failure

Where do I specify after_failure for jobs in build stages? I’ve tried it at the top level and at the job level but it doesn’t seem to take (

Hi! Thanks for the question. So, after_failure can go anywhere in the .travis.yml technically, but I’d recommend putting it at the end for readability. That said, it looks like you’re piping logs into a specific file, which would then be cleaned up when the build exited? Maybe it would make sense to send it to a service like or Or, I’m sure can help with specifics

(PS: apologies for encouraging you to contact support on this thread and others - we’re trying to keep help for specific questions going through email support at the moment, while we scale out the forum)

Since I’m on a free account, I didn’t initially want to bother the support email – which I’ve done in the interim, but this suggestion is genius! I’ve gotten the after_failure to work (set -e has side-effects that cancels running after_failure), but in my after-failure, I will now for sure use to capture the log!

1 Like