Hi all,
while using the latest version of the UnifiedPush Server (0.11.0), that
includes the new frontend-maven-plugin to build the admin-ui module, I was
experiencing random failures when building with Jenkins. I have googled for
a while, and found that the problem was in the concurrent modification of
the bower cache and registry.
I tried one solution suggested in
(
https://github.com/bower/bower/issues/933), so I changed the
admin-ui/.bowerrc file and added the following:
"storage": {
"packages": ".bower-cache",
"registry": ".bower-registry"
},
"tmp": ".bower-tmp"
, so admin-ui/.bowerrc ending with this content:
{
"directory": "app/bower_components"
"storage": {
"packages": ".bower-cache",
"registry": ".bower-registry"
},
"tmp": ".bower-tmp"
}
This made my Jenkins build stable, and I did not experience random failures
anymore (ran 10 subsequent builds without errors, while I could not run 2
successful subsequent builds before).
However, digging more into the thread, I found that the problem of the race
condition against the bower cache was solved in bower version >= 1.3.2
(
https://github.com/bower/bower/pull/1211).
Actually in admin-ui/package.json we have "grunt-bower-task":
"^0.3.4", that
would download a bower version >= 1.2.0 (looking in my Jenkins build, it
downloaded bower version 1.2.8), which is not enough for having the problem
fixed.
So I explicitly forced bower version to be at least 1.3.2, by adding:
"bower": "~1.3.2" into admin-ui/package.json.
The solution is working for me, and I also removed the additional content
inside the file admin-ui/.bowerrc that I added before.
I also found another project that solved the problem in this way:
https://github.com/opf/openproject/commit/36d2e9079b23955d3a1198ec1a8698c...
I have opened a PR for this
(
https://github.com/aerogear/aerogear-unifiedpush-server/pull/275), could
you please review?
Thanks!
Andrea
--
View this message in context:
http://aerogear-dev.1069024.n5.nabble.com/Random-Jenkins-failures-when-bu...
Sent from the aerogear-dev mailing list archive at
Nabble.com.