-
Notifications
You must be signed in to change notification settings - Fork 1k
update Best Practices FAQ for usage in CI #1293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with DEP_VERSION
in an env var. It helps highlight required changes to the example.
This looks good to me. Do you have a Travis build that shows this in action?
I have used the setup here - https://github.com/sudo-suhas/symcrypto. |
Thank you for documenting how to do this with Travis. If someone else wants to do the same for AppVeyor that's would be great. This is good for now and I'd like to get it in our FAQ toot sweet. ❤️ |
@carolynvs Do you think we should also enable caching on travis config? Can be done like so: # ...
cache:
directories:
- $GOPATH/pkg/dep |
@sudo-suhas I don't think that enabling dep caching should be a blanket recommendation. 🤔 Until recently, we have had intermittent cache corruption that would have been super annoying if it was breaking Travis build too. Also according to https://docs.travis-ci.com/user/caching/#Things-not-to-cache they don't recommend it for larger caches. https://docs.travis-ci.com/user/caching/#How-does-the-caching-work%3F
Would you mind making a pull request (or issue) so that we can talk it through with a wider audience? I'm not saying we shouldn't do it, but that we probably want to point people to the caveats and pitch it as "if you want to turn it on, here is the magic shotgun to point at your foot". 😄 |
@carolynvs Thanks for the awesome and through reply. I have created a PR #1359. Please take a look. |
Enables caching for dep. This should improve CI times, but can cause problems if dep's cache gets corrupted. See this PR for more info: golang/dep#1293 (comment)
What does this do / why do we need it?
Updates the FAQ section on 'Best Practices' for usage in a CI environment.
Preview link - sudo-suhas/dep:docs/FAQ.md@
b92d0e7
#how-do-i-use-dep-in-ciWhat should your reviewer look out for in this PR?
Not 100% sure about the usage of
env
in travis config. Would it be better to inline theX.X.X
in thecurl
command itself?Do you need help or clarification on anything?
Should there be an example for appveyor as well? I am not quite sure how we would do this in appveyor though.
Which issue(s) does this PR fix?
fixes #1275
P.S I also made some formatting change for the Docker section to leverage the syntax highlighting in github/editors like vscode.