[JIRA] (JENKINS-60734) Replace js-builder with webpack

5 views
Skip to first unread message

fqueiruga@cloudbees.com (JIRA)

unread,
Jan 10, 2020, 11:09:04 AM1/10/20
to jenkinsc...@googlegroups.com
Félix Queiruga Balado created an issue
 
Jenkins / Improvement JENKINS-60734
Replace js-builder with webpack
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: core
Created: 2020-01-10 16:08
Priority: Minor Minor
Reporter: Félix Queiruga Balado

Right now Jenkins uses a combination of js-builder and gulp as the toolchain to build the frontend assets.

There are many reasons to replace js-builder with a modern, industry-standard tool:

  • It does not support many new technologies and techniques commonly used nowadays, like post-css.
  • It is a tool used only within the Jenkins project. This and the lack of comprehensive documentation makes it difficult for developers to modify or extend the toolchain.
  • It is based on outdated tools (i.e. browserify) and uses a module system that is incompatible with modern JS build tools.

I propose basing the new frontend toolchain on webpack. It is the tool that has the more usage, support and customizability.

The js-builder ecosystem

js-builder offers the possibility, using some sibling libraries (js-modules, js-libs), to have shared libraries across multiple projects running on the same window. For example, if both Jenkins core and a plugin use the same version of jquery, it would only be loaded once.

While this can seem like a great idea, having this behaviour on Core can be problematic. Having core load its own libraries would only add an extra 50-100KB of JS code. It introduces a huge maintainability burden and locks the project into using js-builder & friends.

Planned changes

The goal of this improvement is to replace js-builder with webpack, and use NPM versions of the js-libs used on the project (handlebars, jquery, bootstrap).

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

fqueiruga@cloudbees.com (JIRA)

unread,
Jan 10, 2020, 11:11:02 AM1/10/20
to jenkinsc...@googlegroups.com
Félix Queiruga Balado updated an issue
Change By: Félix Queiruga Balado
Right now Jenkins uses a combination of [js-builder|https://github.com/jenkinsci/js-builder] and gulp as the toolchain to build the frontend assets.


There are many reasons to replace js-builder with a modern, industry-standard tool:
* It does not support many new technologies and techniques commonly used nowadays, like post-css.
* It is
not being actively maintained.
* It is
a tool used only within the Jenkins project. This and the lack of comprehensive documentation makes it difficult for developers to modify or extend the toolchain.
* It is based on outdated tools (i.e. browserify) and uses a module system that is incompatible with modern JS build tools.

I propose basing the new frontend toolchain on [webpack|https://webpack.js.org/]. It is the tool that has the more usage, support and customizability.
h3. The js-builder ecosystem

js-builder offers the possibility, using some sibling libraries ([js-modules|https://github.com/jenkinsci/js-modules], [js-libs|https://github.com/jenkinsci/js-libs]), to have shared libraries across multiple projects running on the same window. For example, if both Jenkins core and a plugin use the same version of jquery, it would only be loaded once.


While this can seem like a great idea, having this behaviour on Core can be problematic. Having core load its own libraries would only add an extra 50-100KB of JS code. It introduces a huge maintainability burden and locks the project into using js-builder & friends.
h3. Planned changes


The goal of this improvement is to replace js-builder with webpack, and use NPM versions of the js-libs used on the project (handlebars, jquery, bootstrap).

fqueiruga@cloudbees.com (JIRA)

unread,
Jan 13, 2020, 6:13:03 AM1/13/20
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 23, 2020, 6:10:02 PM1/23/20
to jenkinsc...@googlegroups.com
Oleg Nenashev resolved as Fixed
 

It was released in Jenkins 2.217. Thanks Félix Queiruga Balado!

Change By: Oleg Nenashev
Status: Open Resolved
Resolution: Fixed
Released As: Jenkins 2.217
Reply all
Reply to author
Forward
0 new messages