Skip to content
Permalink
Browse files

Use base64-encoded SQL credentials (#314)

* Use base64-encoded SQL credentials

Encode Cloud SQL credential files on gcs with base64,
to be consistent with our Cloud Build practices.

Also renamed a property that specifies where to publish
the schema jar. New name is schema_publish_repo.
  • Loading branch information
weiminyu committed Oct 18, 2019
1 parent 85c11ca commit 13dc758747b51d7aff6819f9c82223333b3337e6
Showing with 4 additions and 3 deletions.
  1. +3 −2 db/build.gradle
  2. +1 −1 gradle.properties
@@ -94,6 +94,7 @@ ext {
def command =
"""gsutil cp \
gs://domain-registry${env}-cloudsql-credentials/${role}_credential.enc - | \
base64 -d | \
gcloud kms decrypt --location global --keyring nomulus \
--key sql-credentials-on-gcs-key --plaintext-file=- \
--ciphertext-file=- \
@@ -118,11 +119,11 @@ artifacts {
publishing {
repositories {
maven {
url project.schema_jar_repo
url project.schema_publish_repo
}
}
publications {
schemaOrmPublication(MavenPublication) {
sqlSchemaPublication(MavenPublication) {
groupId 'google.registry'
artifactId 'schema'
version project.schema_version
@@ -24,5 +24,5 @@ dbPassword=

# Maven repository of the Cloud SQL schema jar, which contains the
# SQL DDL scripts.
schema_jar_repo=
schema_publish_repo=
schema_version=

0 comments on commit 13dc758

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