mirror of
https://github.com/google/nomulus
synced 2025-12-23 06:15:42 +00:00
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.
This commit is contained in:
@@ -94,6 +94,7 @@ ext {
|
|||||||
def command =
|
def command =
|
||||||
"""gsutil cp \
|
"""gsutil cp \
|
||||||
gs://domain-registry${env}-cloudsql-credentials/${role}_credential.enc - | \
|
gs://domain-registry${env}-cloudsql-credentials/${role}_credential.enc - | \
|
||||||
|
base64 -d | \
|
||||||
gcloud kms decrypt --location global --keyring nomulus \
|
gcloud kms decrypt --location global --keyring nomulus \
|
||||||
--key sql-credentials-on-gcs-key --plaintext-file=- \
|
--key sql-credentials-on-gcs-key --plaintext-file=- \
|
||||||
--ciphertext-file=- \
|
--ciphertext-file=- \
|
||||||
@@ -118,11 +119,11 @@ artifacts {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url project.schema_jar_repo
|
url project.schema_publish_repo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
publications {
|
publications {
|
||||||
schemaOrmPublication(MavenPublication) {
|
sqlSchemaPublication(MavenPublication) {
|
||||||
groupId 'google.registry'
|
groupId 'google.registry'
|
||||||
artifactId 'schema'
|
artifactId 'schema'
|
||||||
version project.schema_version
|
version project.schema_version
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ dbPassword=
|
|||||||
|
|
||||||
# Maven repository of the Cloud SQL schema jar, which contains the
|
# Maven repository of the Cloud SQL schema jar, which contains the
|
||||||
# SQL DDL scripts.
|
# SQL DDL scripts.
|
||||||
schema_jar_repo=
|
schema_publish_repo=
|
||||||
schema_version=
|
schema_version=
|
||||||
|
|||||||
Reference in New Issue
Block a user