mirror of
https://github.com/google/nomulus
synced 2025-12-23 06:15:42 +00:00
Copy artifacts for schema tests after deployment (#2895)
After each deployment in sandbox or production, move the artifacts from the corresponding release to a well-known location so that they can be mapped to Kokoro in presubmit tests. The Kokoro-mapping does not need public access to the GCS bucket. The artifacts include the postgresql schema jar, the nomulus release jar, and the uber jar of the nomulus schema integration test classes. Every jar name consists of a fixed prefix and the environment. Each jar of a new deployment overrides the previous copy.
This commit is contained in:
@@ -43,7 +43,9 @@ steps:
|
||||
deployCloudSchedulerAndQueue nomulus-config-${_ENV}.yaml cloud-scheduler-tasks-${_ENV}.xml $project_id --gke
|
||||
deployCloudSchedulerAndQueue nomulus-config-${_ENV}.yaml cloud-tasks-queue.xml $project_id --gke
|
||||
# Save the deployed tag for the current environment on GCS, and update the
|
||||
# mappings from Nomulus releases to deployment timestamp.
|
||||
# mappings from Nomulus releases to deployment timestamp. Also copy the
|
||||
# artifacts for schema tests to here. They will be mapped into Kokoro for
|
||||
# presubmit tests.
|
||||
- name: 'gcr.io/$PROJECT_ID/builder:latest'
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
@@ -60,6 +62,11 @@ steps:
|
||||
gs://$PROJECT_ID-deployed-tags/nomulus-gke.${_ENV}.versions \
|
||||
gs://$PROJECT_ID-deployed-tags/nomulus-gke.${_ENV}.tmp \
|
||||
gs://$PROJECT_ID-deployed-tags/nomulus-gke.${_ENV}.versions
|
||||
# Copy the nomulus artifacts for schema test: nomulus foss jars and the uberjar of nomulus test classes.
|
||||
gcloud storage cp gs://$PROJECT_ID-deploy/${TAG_NAME}/nomulus-public.jar \
|
||||
gs://$PROJECT_ID-deployed-tags/schema-test-artifacts/nomulus-public.${_ENV}.jar
|
||||
gcloud storage cp gs://$PROJECT_ID-deploy/${TAG_NAME}/nomulus-tests-alldeps.jar \
|
||||
gs://$PROJECT_ID-deployed-tags/schema-test-artifacts/nomulus-tests-alldeps.${_ENV}.jar
|
||||
timeout: 3600s
|
||||
options:
|
||||
machineType: 'E2_HIGHCPU_32'
|
||||
|
||||
@@ -75,7 +75,7 @@ steps:
|
||||
# Save the deployed tag for the current environment on GCS to a well-known.
|
||||
# location. Do not use the 'artifacts' section for this since it will
|
||||
# upload an extra metadata file every time and pollute the folder.
|
||||
# TODO(weiminyu): modify this step so that TAG_NAME may be 'live'.
|
||||
# Also copy the schema jar here. It will be mapped into Kokoro for presubmit tests.
|
||||
- name: 'gcr.io/$PROJECT_ID/builder:latest'
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
@@ -84,6 +84,9 @@ steps:
|
||||
set -e
|
||||
echo ${TAG_NAME} | \
|
||||
gcloud storage cp - gs://$PROJECT_ID-deployed-tags/sql.${_ENV}.tag\
|
||||
# Copy the schema jar here
|
||||
gcloud storage cp gs://$PROJECT_ID-deploy/${TAG_NAME}/schema.jar \
|
||||
gs://$PROJECT_ID-deployed-tags/schema-test-artifacts/schema.${_ENV}.jar
|
||||
timeout: 3600s
|
||||
options:
|
||||
machineType: 'E2_HIGHCPU_32'
|
||||
|
||||
Reference in New Issue
Block a user