Release SQL schema in Cloud Build (#341)

* Release SQL schema in Cloud Build

Tentatively release SQL schema at the same time as the server release.
Publish schema jar to gs://domain-registry-maven-repository/nomulus
and also upload it with server artifacts.

Also removed the Gradle 'version' variable which is not used.

Tested=On cloud-build with a simplified version of
cloudbuild-nomulus.yaml.
This commit is contained in:
Weimin Yu 2019-11-04 10:22:05 -05:00 committed by GitHub
parent 1bc75495aa
commit bd53fb3bc0
2 changed files with 17 additions and 2 deletions

View file

@ -54,7 +54,6 @@ tasks.withType(JavaCompile).configureEach {
} }
} }
version = '1.0'
sourceCompatibility = '1.8' sourceCompatibility = '1.8'
targetCompatibility = '1.8' targetCompatibility = '1.8'

View file

@ -65,7 +65,22 @@ steps:
# Build and package the deployment files for production. # Build and package the deployment files for production.
- name: 'gcr.io/${PROJECT_ID}/builder:latest' - name: 'gcr.io/${PROJECT_ID}/builder:latest'
args: ['release/build_nomulus_for_env.sh', 'production', 'output'] args: ['release/build_nomulus_for_env.sh', 'production', 'output']
# The tarballs to upload to GCS. # Tentatively build and publish Cloud SQL schema jar here, before schema release
# process is finalized.
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
entrypoint: /bin/bash
args:
- -c
- |
set -e
./gradlew \
:db:publish \
-PmavenUrl=https://storage.googleapis.com/domain-registry-maven-repository/maven \
-PpluginsUrl=https://storage.googleapis.com/domain-registry-maven-repository/plugins \
-Pschema_publish_repo=gcs://domain-registry-maven-repository/nomulus \
-Pschema_version=${TAG_NAME}
cp db/build/libs/schema.jar output/
# The tarballs and jars to upload to GCS.
artifacts: artifacts:
objects: objects:
location: 'gs://${PROJECT_ID}-deploy/${TAG_NAME}' location: 'gs://${PROJECT_ID}-deploy/${TAG_NAME}'
@ -73,6 +88,7 @@ artifacts:
- 'output/*.tar' - 'output/*.tar'
- 'output/tag_name' - 'output/tag_name'
- 'output/nomulus.jar' - 'output/nomulus.jar'
- 'output/schema.jar'
- 'release/cloudbuild-tag.yaml' - 'release/cloudbuild-tag.yaml'
- 'release/cloudbuild-sync.yaml' - 'release/cloudbuild-sync.yaml'
- 'release/cloudbuild-deploy-*.yaml' - 'release/cloudbuild-deploy-*.yaml'