Skip to content
Permalink
Browse files

Make dev project configurable (#371)

* Make dev project configurable

We should not hardcode our dev project in the public config file.

* Remove the use of .ext when using external properties

They are only needed when defining properties.
  • Loading branch information
jianglai committed Nov 22, 2019
1 parent 02846bc commit cc5f62587e897fe0c05991619519947394761557
Showing with 10 additions and 5 deletions.
  1. +2 −2 db/build.gradle
  2. +3 −3 java_common.gradle
  3. +5 −0 projects.gradle
@@ -73,12 +73,12 @@ ext {
getCloudSqlCredential = { env, role ->
def command =
"""gsutil cp \
gs://domain-registry-dev-deploy/cloudsql-credentials/${env}/${role}_credential.enc - | \
gs://${rootProject.devProject}-deploy/cloudsql-credentials/${env}/${role}_credential.enc - | \
base64 -d | \
gcloud kms decrypt --location global --keyring nomulus-tool-keyring \
--key nomulus-tool-key --plaintext-file=- \
--ciphertext-file=- \
--project=domain-registry-dev"""
--project=${rootProject.devProject}"""

return execInBash(command, '/tmp')
}
@@ -94,8 +94,8 @@ task initCoverageMinimums {
].asImmutable()

rootProject.ext.getMinCoverage = { key ->
if (rootProject.ext.coverageMinimums.containsKey(key)) {
return rootProject.ext.coverageMinimums.get(key)
if (rootProject.coverageMinimums.containsKey(key)) {
return rootProject.coverageMinimums.get(key)
}
return 0.0
}
@@ -117,7 +117,7 @@ jacocoTestCoverageVerification {
// or MISSEDRATIO
// - The 'minimum' threshold, given as a fraction or a percentage (including '%')
limit {
minimum = rootProject.ext.getMinCoverage(project.getName())
minimum = rootProject.getMinCoverage(project.getName())
}
}
}
@@ -15,7 +15,12 @@
// Mapping from environment names to GCP projects.
// Replace the values with the names of your deployment environments.

// The projects to run your deployment Nomulus application.
rootProject.ext.projects = ['production': 'your-production-project',
'sandbox' : 'your-sandbox-project',
'alpha' : 'your-alpha-project',
'crash' : 'your-crash-project']

// The project to host your development/deployment infrastructure. It hosts
// things like release artifacts, CI/CD system, etc.
rootProject.ext.devProject = 'your-dev-project'

0 comments on commit cc5f625

Please sign in to comment.
You can’t perform that action at this time.