mirror of
https://github.com/google/nomulus.git
synced 2025-08-04 00:42:12 +02:00
Consolidate app engine deployment gradle tasks
Removed duplicate build files for each service, and also added two tasks that runs deployment/staging for all services. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=224359198
This commit is contained in:
parent
898d0dc0d9
commit
9735978b87
10 changed files with 63 additions and 120 deletions
|
@ -1,28 +0,0 @@
|
|||
plugins {
|
||||
id 'war'
|
||||
}
|
||||
|
||||
// Set this directory before applying the appengine plugin so that the plugin
|
||||
// will recognize this as an app-engine standard app (and also obtains the
|
||||
// appengine-web.xml from the correct location)
|
||||
project.convention.plugins['war'].webAppDirName =
|
||||
'../../java/google/registry/env/crash/backend'
|
||||
|
||||
apply plugin: 'com.google.cloud.tools.appengine'
|
||||
|
||||
// Get the web.xml file for the service.
|
||||
war {
|
||||
webInf {
|
||||
from '../../java/google/registry/env/common/backend/WEB-INF'
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
deploy {
|
||||
project = 'domain-registry-crash'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
}
|
|
@ -24,14 +24,63 @@ gradleLint.autoLintAfterFailure = false
|
|||
ext.javaDir = "${rootDir}/../java"
|
||||
ext.javatestsDir = "${rootDir}/../javatests"
|
||||
|
||||
// Tasks to deploy/stage all App Engine services
|
||||
task deploy {
|
||||
group = 'deployment'
|
||||
description = 'Deploys all services to App Engine.'
|
||||
}
|
||||
|
||||
task stage {
|
||||
group = 'deployment'
|
||||
description = 'Generates application directories for all services.'
|
||||
}
|
||||
|
||||
subprojects {
|
||||
// Skip no-op project
|
||||
if (project.name == 'services') return
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// Exclude all of the module deployment projects.
|
||||
if (project.name in ['default', 'backend', 'tools', 'pubapi']) return
|
||||
// Set up all of the deployment projects.
|
||||
if (project.name in ['default', 'backend', 'tools', 'pubapi']) {
|
||||
|
||||
apply plugin: 'war'
|
||||
|
||||
// Set this directory before applying the appengine plugin so that the
|
||||
// plugin will recognize this as an app-engine standard app (and also
|
||||
// obtains the appengine-web.xml from the correct location)
|
||||
project.convention.plugins['war'].webAppDirName =
|
||||
"../../../java/google/registry/env/crash/${project.name}"
|
||||
|
||||
apply plugin: 'com.google.cloud.tools.appengine'
|
||||
|
||||
// Get the web.xml file for the service.
|
||||
war {
|
||||
webInf {
|
||||
from "../../../java/google/registry/env/common/${project.name}/WEB-INF"
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
deploy {
|
||||
// TODO: change this to a variable.
|
||||
project = 'domain-registry-crash'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
}
|
||||
|
||||
rootProject.deploy.dependsOn appengineDeploy
|
||||
rootProject.stage.dependsOn appengineStage
|
||||
|
||||
// Return early, do not apply the settings below.
|
||||
return
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'nebula.lint'
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
plugins {
|
||||
id 'war'
|
||||
}
|
||||
|
||||
// Set this directory before applying the appengine plugin so that the plugin
|
||||
// will recognize this as an app-engine standard app (and also obtains the
|
||||
// appengine-web.xml from the correct location)
|
||||
project.convention.plugins['war'].webAppDirName =
|
||||
'../../java/google/registry/env/crash/default'
|
||||
|
||||
apply plugin: 'com.google.cloud.tools.appengine'
|
||||
|
||||
// Get the web.xml and cron.xml files for the service.
|
||||
war {
|
||||
webInf {
|
||||
from '../../java/google/registry/env/common/default/WEB-INF'
|
||||
from '../../java/google/registry/env/crash/tools/WEB-INF/cron.xml'
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
deploy {
|
||||
project = 'domain-registry-crash'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
plugins {
|
||||
id 'war'
|
||||
}
|
||||
|
||||
// Set this directory before applying the appengine plugin so that the plugin
|
||||
// will recognize this as an app-engine standard app (and also obtains the
|
||||
// appengine-web.xml from the correct location)
|
||||
project.convention.plugins['war'].webAppDirName =
|
||||
'../../java/google/registry/env/crash/pubapi'
|
||||
|
||||
apply plugin: 'com.google.cloud.tools.appengine'
|
||||
|
||||
// Get the web.xml file for the service.
|
||||
war {
|
||||
webInf {
|
||||
from '../../java/google/registry/env/common/pubapi/WEB-INF'
|
||||
from '../../java/google/registry/env/crash/pubapi/WEB-INF/cron.xml'
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
deploy {
|
||||
project = 'domain-registry-crash'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
}
|
2
gradle/services/backend/README.txt
Normal file
2
gradle/services/backend/README.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
This directory is intentionally empty. This subproject is configred through root
|
||||
project build script.
|
2
gradle/services/default/README.txt
Normal file
2
gradle/services/default/README.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
This directory is intentionally empty. This subproject is configred through root
|
||||
project build script.
|
2
gradle/services/pubapi/README.txt
Normal file
2
gradle/services/pubapi/README.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
This directory is intentionally empty. This subproject is configred through root
|
||||
project build script.
|
2
gradle/services/tools/README.txt
Normal file
2
gradle/services/tools/README.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
This directory is intentionally empty. This subproject is configred through root
|
||||
project build script.
|
|
@ -4,7 +4,7 @@ include 'core'
|
|||
include 'proxy'
|
||||
include 'third_party'
|
||||
include 'util'
|
||||
include 'default'
|
||||
include 'backend'
|
||||
include 'tools'
|
||||
include 'pubapi'
|
||||
include 'services:default'
|
||||
include 'services:backend'
|
||||
include 'services:tools'
|
||||
include 'services:pubapi'
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
plugins {
|
||||
id 'war'
|
||||
}
|
||||
|
||||
// Set this directory before applying the appengine plugin so that the plugin
|
||||
// will recognize this as an app-engine standard app (and also obtains the
|
||||
// appengine-web.xml from the correct location)
|
||||
project.convention.plugins['war'].webAppDirName =
|
||||
'../../java/google/registry/env/crash/tools'
|
||||
|
||||
apply plugin: 'com.google.cloud.tools.appengine'
|
||||
|
||||
// Get the web.xml file for the service.
|
||||
war {
|
||||
webInf {
|
||||
from '../../java/google/registry/env/common/tools/WEB-INF'
|
||||
}
|
||||
}
|
||||
|
||||
appengine {
|
||||
deploy {
|
||||
project = 'domain-registry-crash'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core')
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue