Browse Source

Add a skip.ui.build flag that skips only the UI builds

frontend-maven-plugin reads skip.yarn on its own, so -Dskip.yarn=true switches
off every yarn invocation in the project at once. That is the right shortcut for
a local backend build, but it is too blunt for CI: it also silences the
msa/js-executor sandbox tests, which are the only yarn-driven tests worth
keeping.

skip.ui.build is declared once in the root pom and defaults to ${skip.yarn}. It
is wired into the frontend-maven-plugin configuration of ui-ngx and msa/web-ui,
and into the pkg.skip.zip of msa/web-ui, whose Windows ZIP bundles the launcher
that `yarn run pkg` produces. It is deliberately NOT wired into
msa/js-executor: with -Dskip.ui.build=true that module still runs its yarn
install, its `yarn run pkg` and its sandbox tests.

Behaviour:
  no flags               everything builds and is tested as before
  -Dskip.ui.build=true   ui-ngx and msa/web-ui skip;
                         msa/js-executor still builds and runs its tests
  -Dskip.yarn=true       everything skips, exactly as before

The <skip> element is declared at plugin level rather than per execution so that
it also covers the executions contributed by the yarn-build and yarn-start
profiles, and so that node/yarn itself is no longer downloaded when there is
nothing to run.
pull/16152/head
Viacheslav Klimov 3 months ago
parent
commit
6172ca8963
Failed to extract signature
  1. 7
      msa/web-ui/pom.xml
  2. 7
      pom.xml
  3. 3
      ui-ngx/pom.xml

7
msa/web-ui/pom.xml

@ -33,10 +33,10 @@
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist> <pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist> <pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
<!-- The Windows ZIP bundles the native launcher that `yarn run pkg` produces, so there is <!-- The Windows ZIP bundles the native launcher that `yarn run pkg` produces, so there is
nothing to assemble when the yarn build is skipped. skip.yarn is referenced directly nothing to assemble when the UI build is skipped. skip.ui.build is referenced directly
(not through a profile) so that it is honoured both when it comes from the command (not through a profile) so that it is honoured both when it comes from the command
line and when it comes from a pom property. --> line and when it comes from a pom property. -->
<pkg.skip.zip>${skip.yarn}</pkg.skip.zip> <pkg.skip.zip>${skip.ui.build}</pkg.skip.zip>
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase> <docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
</properties> </properties>
@ -65,6 +65,9 @@
<configuration> <configuration>
<installDirectory>target</installDirectory> <installDirectory>target</installDirectory>
<workingDirectory>${basedir}</workingDirectory> <workingDirectory>${basedir}</workingDirectory>
<!-- Declared at plugin level so that it covers every execution of this plugin,
including the ones contributed by the profiles below. -->
<skip>${skip.ui.build}</skip>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>

7
pom.xml

@ -28,6 +28,13 @@
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<main.dir>${basedir}</main.dir> <main.dir>${basedir}</main.dir>
<!-- Set to true to skip only the UI builds: the Angular application in ui-ngx and the
`yarn run pkg` launcher of msa/web-ui. It deliberately does NOT
cover msa/js-executor, whose yarn install and sandbox tests keep running.
frontend-maven-plugin reads skip.yarn itself, so that property cannot be narrowed to a
subset of the modules; this one can, and it defaults to skip.yarn so that
-Dskip.yarn=true still skips every yarn invocation in the project exactly as before. -->
<skip.ui.build>${skip.yarn}</skip.ui.build>
<pkg.process-resources.phase>none</pkg.process-resources.phase> <pkg.process-resources.phase>none</pkg.process-resources.phase>
<pkg.package.phase>none</pkg.package.phase> <pkg.package.phase>none</pkg.package.phase>
<!-- Use -Dpkg.skip=true to skip all packaging at once (bootjar + deb + rpm + zip). <!-- Use -Dpkg.skip=true to skip all packaging at once (bootjar + deb + rpm + zip).

3
ui-ngx/pom.xml

@ -37,6 +37,9 @@
<configuration> <configuration>
<installDirectory>target</installDirectory> <installDirectory>target</installDirectory>
<workingDirectory>${basedir}</workingDirectory> <workingDirectory>${basedir}</workingDirectory>
<!-- Declared at plugin level so that it covers every execution of this plugin,
including the ones contributed by the profiles below. -->
<skip>${skip.ui.build}</skip>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>

Loading…
Cancel
Save