Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Cloud Build schema-deploy config to GCS #435

Merged
merged 1 commit into from Jan 9, 2020

Conversation

@weiminyu
Copy link
Collaborator

weiminyu commented Jan 8, 2020

Generate env-specific schema-deploy configs and upload them to GCS.


This change is Reviewable

Forgot to upload cloudbuild-schema-deploy.yaml to GCS.
@googlebot googlebot added the cla: yes label Jan 8, 2020
@weiminyu weiminyu requested review from jianglai and mindhog Jan 9, 2020
@mindhog
mindhog approved these changes Jan 9, 2020
Copy link
Member

mindhog left a comment

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jianglai)

Copy link
Member

jianglai left a comment

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @weiminyu)


release/cloudbuild-release.yaml, line 122 at r1 (raw file):

Quoted 18 lines of code…
  - -c
  - |
    set -e
    builder_digest=$( \
      gcloud container images list-tags gcr.io/${PROJECT_ID}/builder \
      --format='get(digest)' --filter='tags = ${TAG_NAME}')
    schema_deployer_digest=$( \
      gcloud container images list-tags gcr.io/${PROJECT_ID}/schema_deployer \
      --format='get(digest)' --filter='tags = ${TAG_NAME}')
    sed -i s/builder:latest/builder@$builder_digest/g \
      release/cloudbuild-schema-deploy.yaml
    sed -i s/schema_deployer:latest/schema_deployer@$schema_deployer_digest/g \
      release/cloudbuild-schema-deploy.yaml
    sed -i s/'$${TAG_NAME}'/${TAG_NAME}/g release/cloudbuild-schema-deploy.yaml
    for environment in alpha crash sandbox production; do
      sed s/'$${_ENV}'/${environment}/g release/cloudbuild-schema-deploy.yaml \
        > release/cloudbuild-schema-deploy-${environment}.yaml
    done

I think I've asked before, but this step does a lot of things (like extracting the digest) that the previous step already does. We should consider merging them.

@weiminyu weiminyu requested a review from jianglai Jan 9, 2020
Copy link
Collaborator Author

weiminyu left a comment

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jianglai)


release/cloudbuild-release.yaml, line 122 at r1 (raw file):

Previously, jianglai (Lai Jiang) wrote…
  - -c
  - |
    set -e
    builder_digest=$( \
      gcloud container images list-tags gcr.io/${PROJECT_ID}/builder \
      --format='get(digest)' --filter='tags = ${TAG_NAME}')
    schema_deployer_digest=$( \
      gcloud container images list-tags gcr.io/${PROJECT_ID}/schema_deployer \
      --format='get(digest)' --filter='tags = ${TAG_NAME}')
    sed -i s/builder:latest/builder@$builder_digest/g \
      release/cloudbuild-schema-deploy.yaml
    sed -i s/schema_deployer:latest/schema_deployer@$schema_deployer_digest/g \
      release/cloudbuild-schema-deploy.yaml
    sed -i s/'$${TAG_NAME}'/${TAG_NAME}/g release/cloudbuild-schema-deploy.yaml
    for environment in alpha crash sandbox production; do
      sed s/'$${_ENV}'/${environment}/g release/cloudbuild-schema-deploy.yaml \
        > release/cloudbuild-schema-deploy-${environment}.yaml
    done

I think I've asked before, but this step does a lot of things (like extracting the digest) that the previous step already does. We should consider merging them.

Acknowledged.

Let's review this after we have got the full release workflow finalized. I still think there may be a case to release schema separately.

@weiminyu weiminyu requested a review from mindhog Jan 9, 2020
Copy link
Member

jianglai left a comment

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@weiminyu weiminyu merged commit d4b1048 into google:master Jan 9, 2020
7 checks passed
7 checks passed
LGTM analysis: Java No code changes detected
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
cla/google All necessary CLAs are signed
code-review/reviewable 2 files reviewed
Details
kokoro-foss Kokoro build finished
Details
kokoro-internal Kokoro build finished
Details
@weiminyu weiminyu deleted the weiminyu:cloudbuild-sql-deploy branch Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.