diff --git a/appengine_war.gradle b/appengine_war.gradle index a5f026eaf..8c745aca2 100644 --- a/appengine_war.gradle +++ b/appengine_war.gradle @@ -103,6 +103,7 @@ explodeWar.doLast { file("${it.explodedAppDirectory}/WEB-INF/lib/tools.jar").setWritable(true) } +appengineDeployAll.finalizedBy ':cloudSchedulerDeployer' rootProject.deploy.dependsOn appengineDeployAll rootProject.stage.dependsOn appengineStage tasks['war'].dependsOn ':console-webapp:buildConsoleWebappProd' diff --git a/build.gradle b/build.gradle index 1610a9f4d..c7773f2ed 100644 --- a/build.gradle +++ b/build.gradle @@ -558,6 +558,21 @@ task coreDev { javadocDependentTasks.each { tasks.javadoc.dependsOn(it) } +// Runs the script, which deploys cloud scheduler tasks based on the config +task cloudSchedulerDeployer { + doLast { + def env = environment + if (!prodOrSandboxEnv) { + exec { + commandLine 'go', 'run', + "${rootDir}/release/builder/cloudSchedulerDeployer.go", + "${rootDir}/core/src/main/java/google/registry/env/${env}/default/WEB-INF/cloud-scheduler-tasks.xml", + "domain-registry-${env}" + } + } + } +} + // disable javadoc in subprojects, these will break because they don't have // the correct classpath (see above). gradle.taskGraph.whenReady { graph -> diff --git a/core/build.gradle b/core/build.gradle index 1167feb59..1e9c50f18 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1028,6 +1028,7 @@ test { // TODO(weiminyu): Remove dependency on sqlIntegrationTest }.dependsOn(fragileTest, outcastTest, standardTest, registryToolIntegrationTest, sqlIntegrationTest) + // When we override tests, we also break the cleanTest command. cleanTest.dependsOn(cleanFragileTest, cleanOutcastTest, cleanStandardTest, cleanRegistryToolIntegrationTest, cleanSqlIntegrationTest)