stable

Clone or download

Read-only

request #14655: Parallelize the builds of the assets

Lerna is used to achieve that as a replacement of gulp. The concurrency is limited to <number_cpus> - 2 to keep some breathing room when building the assets. To manage the dependency between internal packages, the dependency are now defined in the package.json with a local path. However when doing that npm adds the whole tree of the local dependency into the lockfile which makes things hard and fastidious to maintain. When Lerna is used to completely manage the dependencies the lockfiles does have the mention of the local dependency as one would expect. However in the situation in which Tuleap is with a composite mono-repo where some parts might not present it is not possible the use Lerna with all its capabilities. Hoisting becomes impossible and overall managing dependencies at the global level is dangerous because we are never sure if we have the complete snapshot of the monorepo or not. To avoid that we keep managing each package individually and for packages with a local dependency we rewrite the lockfile to not have duplicate trees. As a result usual npm commands still work (with the exception of 'npm ci' since the lockfile appears incomplete) and contributors does not have to learn another tool. Since the local dependency are defined in the package.json Lerna is capable to run the build scripts in the order imposed by the dependencies. Change-Id: I62b625e4f7f7a150f6afc4325ab16b83294dbc9f

Modified Files

Name
D gulpfile.js +0 −53 Go to diff View file
M package-lock.json +50 −1752 Go to diff View file
M package.json +1 −6 Go to diff View file
D plugins/admindelegation/build-manifest.json +0 −7 Go to diff View file
M plugins/agiledashboard/build-manifest.json +0 −2 Go to diff View file
M plugins/agiledashboard/package.json +3 −1 Go to diff View file
D plugins/api_explorer/build-manifest.json +0 −4 Go to diff View file
D plugins/artifactsfolders/build-manifest.json +0 −4 Go to diff View file
D plugins/bugzilla_reference/build-manifest.json +0 −4 Go to diff View file
D plugins/captcha/build-manifest.json +0 −4 Go to diff View file
D plugins/cardwall/build-manifest.json +0 −4 Go to diff View file
M plugins/crosstracker/build-manifest.json +0 −2 Go to diff View file
M plugins/crosstracker/scripts/package.json +3 −1 Go to diff View file
D plugins/docman/build-manifest.json +0 −4 Go to diff View file
M plugins/document/build-manifest.json +1 −5 Go to diff View file
D plugins/forumml/build-manifest.json +0 −6 Go to diff View file
M plugins/frs/build-manifest.json +0 −1 Go to diff View file
M plugins/git/build-manifest.json +0 −1 Go to diff View file
M plugins/graphontrackersv5/build-manifest.json +0 −4 Go to diff View file
D plugins/hudson/build-manifest.json +0 −7 Go to diff View file
M plugins/hudson_git/build-manifest.json +0 −1 Go to diff View file
D plugins/hudson_svn/build-manifest.json +0 −6 Go to diff View file
M plugins/label/build-manifest.json +0 −4 Go to diff View file
M plugins/ldap/build-manifest.json +0 −4 Go to diff View file
D plugins/mediawiki/build-manifest.json +0 −6 Go to diff View file
M plugins/oauth2_server/build-manifest.json +0 −1 Go to diff View file
D plugins/openidconnectclient/build-manifest.json +0 −4 Go to diff View file
D plugins/pluginsadministration/build-manifest.json +0 −4 Go to diff View file
D plugins/proftpd/build-manifest.json +0 −4 Go to diff View file
D plugins/project_ownership/build-manifest.json +0 −4 Go to diff View file
D plugins/projectlinks/build-manifest.json +0 −4 Go to diff View file
M plugins/projectmilestones/build-manifest.json +1 −5 Go to diff View file
M plugins/pullrequest/build-manifest.json +1 −2 Go to diff View file
D plugins/statistics/build-manifest.json +0 −4 Go to diff View file
M plugins/svn/build-manifest.json +0 −1 Go to diff View file
M plugins/taskboard/build-manifest.json +0 −1 Go to diff View file
M plugins/timetracking/build-manifest.json +0 −4 Go to diff View file
M plugins/tracker/build-manifest.json +0 −1 Go to diff View file
M plugins/tracker/scripts/package-lock.json +2 −1 Go to diff View file
M plugins/tracker/scripts/package.json +1 −0 Go to diff View file
D plugins/tracker_encryption/build-manifest.json +0 −4 Go to diff View file
D plugins/tuleap_synchro/build-manifest.json +0 −4 Go to diff View file
D plugins/userlog/build-manifest.json +0 −4 Go to diff View file
M plugins/velocity/build-manifest.json +1 −2 Go to diff View file
M tools/rpm/tuleap.rhel6.spec +1 −3 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +1 −3 Go to diff View file
A tools/utils/scripts/clean-lockfile-from-local-tuleap-dep.php +54 −0 Go to diff View file
D tools/utils/scripts/component-builder.js +0 −72 Go to diff View file
A tools/utils/scripts/max-usable-processors.js +22 −0 Go to diff View file
D tools/utils/scripts/tuleap-gulp-build.js +0 −158 Go to diff View file