Skip to content

Commit

Permalink
Remove script mode from tests (GoogleCloudPlatform#74)
Browse files Browse the repository at this point in the history
The nightly tests have started failing.  Script mode isn't GA yet so I think some underlying functionality there has changed, causing the tests to fail.  Moving back to `entrypoint: /bin/bash`
  • Loading branch information
dinagraves authored Feb 16, 2022
1 parent d8436bf commit c624fbc
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 44 deletions.
18 changes: 12 additions & 6 deletions basic-config/test.cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
steps:
- id: test-builds-successfully
name: gcr.io/google.com/cloudsdktool/cloud-sdk
script: |
cd basic-config
gcloud builds submit --config cloudbuild.yaml
dir: basic-config
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud builds submit --config cloudbuild.yaml
- id: cleanup
name: gcr.io/google.com/cloudsdktool/cloud-sdk
script: |
gcloud compute instances delete my-vm-name --zone us-central1-a
gcloud artifacts docker images delete us-central1-docker.pkg.dev/${PROJECT_ID}/my-docker-repo/myimage
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud compute instances delete my-vm-name --zone us-central1-a
gcloud artifacts docker images delete us-central1-docker.pkg.dev/${PROJECT_ID}/my-docker-repo/myimage
25 changes: 17 additions & 8 deletions deploy-firebase-example/test.cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
steps:
- id: clone-install-builder
name: gcr.io/google.com/cloudsdktool/cloud-sdk
script: |
git clone https://github.com/GoogleCloudPlatform/cloud-builders-community.git
cd cloud-builders-community/firebase
gcloud builds submit . --project $_TARGET_PROJECT
entrypoint: /bin/bash
args:
- '-c'
- |
git clone https://github.com/GoogleCloudPlatform/cloud-builders-community.git
cd cloud-builders-community/firebase
gcloud builds submit . --project $_TARGET_PROJECT
- id: test-builds-successfully
name: gcr.io/google.com/cloudsdktool/cloud-sdk
dir: deploy-firebase-example/
script: |
gcloud builds submit --config cloudbuild.yaml --project $_TARGET_PROJECT
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud builds submit --config cloudbuild.yaml --project $_TARGET_PROJECT
- id: cleanup-builder-image
name: gcr.io/google.com/cloudsdktool/cloud-sdk
script: |
gcloud container images delete gcr.io/$_TARGET_PROJECT/firebase --project $_TARGET_PROJECT
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud container images delete gcr.io/$_TARGET_PROJECT/firebase --project $_TARGET_PROJECT
24 changes: 13 additions & 11 deletions golang-sample/test.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ steps:
- id: test-builds-successfully
name: gcr.io/google.com/cloudsdktool/cloud-sdk
dir: golang-sample/
env:
- 'SHORT_SHA=$SHORT_SHA'
script: |
gcloud builds submit --config cloudbuild.yaml \
--substitutions SHORT_SHA=${SHORT_SHA},_REPO_NAME=${_REPO_NAME},_BUCKET_NAME=${_BUCKET_NAME}
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud builds submit --config cloudbuild.yaml \
--substitutions SHORT_SHA=${SHORT_SHA},_REPO_NAME=${_REPO_NAME},_BUCKET_NAME=${_BUCKET_NAME}
- id: cleanup
name: gcr.io/google.com/cloudsdktool/cloud-sdk
env:
- 'SHORT_SHA=$SHORT_SHA'
script: |
gsutil rm gs://${_BUCKET_NAME}/${SHORT_SHA}_test_log.xml
gcloud artifacts docker images delete us-central1-docker.pkg.dev/${PROJECT_ID}/${_REPO_NAME}/myimage:${SHORT_SHA}
gcloud run services delete helloworld-${SHORT_SHA} --region us-central1 --quiet
entrypoint: /bin/bash
args:
- '-c'
- |
gsutil rm gs://${_BUCKET_NAME}/${SHORT_SHA}_test_log.xml
gcloud artifacts docker images delete us-central1-docker.pkg.dev/${PROJECT_ID}/${_REPO_NAME}/myimage:${SHORT_SHA}
gcloud run services delete helloworld-${SHORT_SHA} --region us-central1 --quiet
14 changes: 10 additions & 4 deletions gradle-example/test.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ steps:
- id: test-builds-successfully
name: gcr.io/google.com/cloudsdktool/cloud-sdk
dir: gradle-example
script: |
gcloud builds submit --config cloudbuild.yaml
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud builds submit --config cloudbuild.yaml
- id: cleanup
name: gcr.io/google.com/cloudsdktool/cloud-sdk
script: |
gcloud container images delete gcr.io/${PROJECT_ID}/hello-spring
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud container images delete gcr.io/${PROJECT_ID}/hello-spring
7 changes: 5 additions & 2 deletions multiple-node-versions-example/test.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ steps:
- id: test-builds-successfully
name: gcr.io/google.com/cloudsdktool/cloud-sdk
dir: multiple-node-versions-example
script: |
gcloud builds submit --substitutions=_NODE_VERSION=17
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud builds submit --substitutions=_NODE_VERSION=17
26 changes: 13 additions & 13 deletions python-example-flask/test.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ steps:
- id: test-builds-successfully
name: gcr.io/google.com/cloudsdktool/cloud-sdk
dir: python-example-flask/
env:
- 'SHORT_SHA=$SHORT_SHA'
- '_REPO_NAME=$_REPO_NAME'
- '_BUCKET_NAME=$_BUCKET_NAME'
script: |
gcloud builds submit --config cloudbuild.yaml \
--substitutions SHORT_SHA=${SHORT_SHA},_REPO_NAME=${_REPO_NAME},_BUCKET_NAME=${_BUCKET_NAME}
entrypoint: /bin/bash
args:
- '-c'
- |
gcloud builds submit --config cloudbuild.yaml \
--substitutions SHORT_SHA=${SHORT_SHA},_REPO_NAME=${_REPO_NAME},_BUCKET_NAME=${_BUCKET_NAME}
- id: cleanup
name: gcr.io/google.com/cloudsdktool/cloud-sdk
env:
- 'SHORT_SHA=$SHORT_SHA'
script: |
gsutil rm gs://${_BUCKET_NAME}/${SHORT_SHA}_test_log.xml
gcloud artifacts docker images delete us-central1-docker.pkg.dev/${PROJECT_ID}/${_REPO_NAME}/myimage:${SHORT_SHA}
gcloud run services delete helloworld-${SHORT_SHA} --region us-central1 --quiet
entrypoint: /bin/bash
args:
- '-c'
- |
gsutil rm gs://${_BUCKET_NAME}/${SHORT_SHA}_test_log.xml
gcloud artifacts docker images delete us-central1-docker.pkg.dev/${PROJECT_ID}/${_REPO_NAME}/myimage:${SHORT_SHA}
gcloud run services delete helloworld-${SHORT_SHA} --region us-central1 --quiet

0 comments on commit c624fbc

Please sign in to comment.