dependency-track: stop bundling frontend in jar (#386408)

This commit is contained in:
xanderio
2025-03-04 09:39:44 +01:00
committed by GitHub
4 changed files with 12 additions and 8 deletions
@@ -465,6 +465,10 @@
[Prisma ORM upgrade guide](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6)
for more information.
- `depdendency-track` no longer bundes the UI inside the jar. This bundling
functionality is deprecated by upstream and causes UI assets not being served
after weeks of runtime.
- `nq` was updated to 1.0, which renames the `fq` and `tq` utilities to `nqtail` and `nqterm` respectively.
- `zf` was updated to 0.10.2, which includes breaking changes from the [0.10.0 release](https://github.com/natecraddock/zf/releases/tag/0.10.0).
@@ -509,7 +509,8 @@ in
upstreams.dependency-track.servers."localhost:${toString cfg.port}" = { };
virtualHosts.${cfg.nginx.domain} = {
locations = {
"/".proxyPass = "http://dependency-track";
"/".alias = "${cfg.package.frontend}/dist/";
"/api".proxyPass = "http://dependency-track";
"= /static/config.json".alias = frontendConfigFile;
};
};
+1
View File
@@ -16,6 +16,7 @@ import ./make-test-python.nix (
virtualisation = {
cores = 2;
diskSize = 4096;
memorySize = 1024 * 2;
};
environment.systemPackages = with pkgs; [ curl ];
+5 -7
View File
@@ -28,6 +28,11 @@ let
hash = "sha256-IcahhuWX1Ba7kmyJaNJlY1gcVHOR6uynyr7w5MMwRgo=";
};
installPhase = ''
mkdir $out
cp -R ./dist $out/
'';
npmDepsHash = "sha256-LeSKSZYtjrZ84RkhGbLEMHVi1fw7FK/137F0V4hjSCE=";
forceGitDeps = true;
makeCacheWritable = true;
@@ -74,17 +79,11 @@ maven.buildMavenPackage rec {
"-Dmaven.test.skip=true"
"-P enhance"
"-P embedded-jetty"
"-P bundle-ui"
"-Dservices.bom.merge.skip=false"
"-Dlogback.configuration.file=${src}/src/main/docker/logback.xml"
"-Dcyclonedx-cli.path=${lib.getExe cyclonedx-cli}"
];
preBuild = ''
mkdir -p frontend
cp -r ${frontend}/lib/node_modules/@dependencytrack/frontend/dist frontend/
'';
afterDepsSetup = ''
mvn cyclonedx:makeBom -Dmaven.repo.local=$mvnDeps/.m2 \
org.codehaus.mojo:exec-maven-plugin:exec@merge-services-bom
@@ -105,7 +104,6 @@ maven.buildMavenPackage rec {
'';
passthru = {
# passthru for nix-update
inherit frontend;
tests = {
inherit (nixosTests) dependency-track;