[travis] Avoiding build timeouts#2820
Conversation
Travis CI will timeout if there is no activity printed to stdout or stderr for 10 minutes. Running our mvn commands with --quiet option may hit this limit for any number of reasons (more code, network conditions). To avoid this, we remove --quiet and adjust some other Maven configuration options. One, specifically, is the cached .m2/repository directory. We bind this to a non-user home location due to the -u binding found in run-in-docker.sh. We then provide a settings.xml and CLI option to tell maven where to look for our cached repository directory. This should allow both users and CI to run the script in a consistent way, but most importantly should allow Travis to continue to cache artifacts across builds.
|
cc @OpenAPITools/generator-core-team |
|
https://travis-ci.org/OpenAPITools/openapi-generator/builds/528265655?utm_source=github_status&utm_medium=notification (Travis job) still timed out. |
* master: resize lightbow logo add lightbow logo add Lightbow as sponsor (#2822) [docs] Document new templating engine, adding ability to reference templates by file to comlete the example (#2773) [JAVA][KOTLIN] fix var Naming for all uppercase with Numbers (#2794) [Documentation] Add instructions to build the javascript client module (#2806) use mvn instead of run-in-docker (#2821) Better handling of form data (#2818) [haskell-servant] Add some missing types to the generated modules (#2675)
|
Summarizing discussion from chat here… We were using The option I've taken in this PR is to provide some options for CI which will limit some logs (Slf4jMavenTransferListener=WARN) while still outputting mvn output without |
…ad-safe), and use travis_wait 20 on mvn clean install
6a26c19 to
76d540d
Compare
|
Travis builds have succeeded, and others are unaffected by these changes, so I'll go ahead and merge this. |
|
work was also done in #2821 to remove |
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master,. Default:3.4.x,4.0.xmaster.Description of the PR
Travis CI will timeout if there is no activity printed to stdout or
stderr for 10 minutes. Running our mvn commands with --quiet option may
hit this limit for any number of reasons (more code, network
conditions). To avoid this, we remove --quiet and adjust some other
Maven configuration options.
One, specifically, is the cached .m2/repository directory. We bind this
to a non-user home location due to the -u binding found in
run-in-docker.sh. We then provide a settings.xml and CLI option to tell
maven where to look for our cached repository directory. This should
allow both users and CI to run the script in a consistent way, but most
importantly should allow Travis to continue to cache artifacts across
builds.