diff --git a/build.gradle b/build.gradle index d066f7873..7c8b51fb2 100644 --- a/build.gradle +++ b/build.gradle @@ -609,3 +609,15 @@ gradle.taskGraph.whenReady { graph -> } } } + +task buildAll { + group = 'build' + description = 'Runs the standard build plus all heavy staging/Docker dependencies and fragile tests that were stripped out of the default build for performance.' + dependsOn build + dependsOn ':core:fragileTest' + dependsOn ':core:sqlIntegrationTest' + dependsOn ':core:buildToolImage' + dependsOn ':stage' + dependsOn ':jetty:buildNomulusImage' + dependsOn ':console-webapp:buildConsoleForAll' +} diff --git a/console-webapp/build.gradle b/console-webapp/build.gradle index 24f788739..2a47ed708 100644 --- a/console-webapp/build.gradle +++ b/console-webapp/build.gradle @@ -74,6 +74,14 @@ def createConsoleTask = { env -> createConsoleTask(env) } +// Force an order so we don't run these tasks in parallel. +tasks.buildConsoleForCrash.mustRunAfter(tasks.buildConsoleForAlpha) +tasks.buildConsoleForQa.mustRunAfter(tasks.buildConsoleForCrash) +tasks.buildConsoleForSandbox.mustRunAfter(tasks.buildConsoleForQa) +tasks.buildConsoleForProduction.mustRunAfter(tasks.buildConsoleForSandbox) +// This task must run last, otherwise the previous tasks will have deleted the "dist" folder. +tasks.buildConsoleWebapp.mustRunAfter(tasks.buildConsoleForProduction) + task applyFormatting(type: Exec) { workingDir "${consoleDir}/" executable 'npm' diff --git a/core/src/test/java/google/registry/server/RegistryTestServer.java b/core/src/test/java/google/registry/server/RegistryTestServer.java index 89c2a42f0..700b60f50 100644 --- a/core/src/test/java/google/registry/server/RegistryTestServer.java +++ b/core/src/test/java/google/registry/server/RegistryTestServer.java @@ -33,7 +33,7 @@ public final class RegistryTestServer { public static final ImmutableMap RUNFILES = new ImmutableMap.Builder() - .put("/console/*", PROJECT_ROOT.resolve("console-webapp/staged/dist")) + .put("/console/*", PROJECT_ROOT.resolve("console-webapp/staged/dist/browser")) .build(); public static final ImmutableList ROUTES = diff --git a/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java b/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java index d57eb7efe..7663134e2 100644 --- a/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java +++ b/core/src/test/java/google/registry/webdriver/ConsoleScreenshotTest.java @@ -174,7 +174,9 @@ public class ConsoleScreenshotTest { // Script that set cursor to transparent to prevent blanking cursor flakiness when comparing // screenshots String script = - "document.styleSheets[0].insertRule(\"html * {caret-color: transparent !important;}\")"; + "var style = document.createElement('style');" + + "style.innerHTML = 'html * {caret-color: transparent !important;}';" + + "document.head.appendChild(style);"; driver.executeScript(script); }