Last active
          January 10, 2023 22:22 
        
      - 
      
- 
        Save apstndb/f362881ac2335f10a5ebe5456e5c4cec to your computer and use it in GitHub Desktop. 
Revisions
- 
        apstndb revised this gist Jun 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ steps: # Cloud Build uses cloudbuild network # https://cloud.google.com/cloud-build/docs/overview#build_configuration_and_build_steps - name: gcr.io/cloud-builders/docker args: ['run', '-d', '--network=cloudbuild', '--name=cds-emulator', 'google/cloud-sdk:248.0.0', 'gcloud', 'beta', 'emulators', 'datastore', 'start', '--host-port=0.0.0.0:8081'] 
- 
        apstndb revised this gist Jun 3, 2019 . 2 changed files with 8 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ ``` cloud-build-local --config=cloudbuild.yaml --dryrun=false . ``` ## refs https://cloud.google.com/cloud-build/docs/overview#build_configuration_and_build_steps > Each build step is run with its container attached to a local Docker network named cloudbuild. This allows build steps to communicate with each other and share data. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ steps: # Cloud Build uses cloud # https://cloud.google.com/cloud-build/docs/overview#build_configuration_and_build_steps - name: gcr.io/cloud-builders/docker args: ['run', '-d', '--network=cloudbuild', '--name=cds-emulator', 'google/cloud-sdk:248.0.0', 'gcloud', 'beta', 'emulators', 'datastore', 'start', '--host-port=0.0.0.0:8081'] - name: jwilder/dockerize:0.6.1 
- 
        apstndb revised this gist Jun 3, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,5 +7,6 @@ steps: env: - DATASTORE_EMULATOR_HOST=cds-emulator:8081 args: ['sh', '-c', 'curl $${DATASTORE_EMULATOR_HOST}/v1/projects/example-project/indexes'] # for cloud-build-local - name: gcr.io/cloud-builders/docker args: ['rm', '--force', 'cds-emulator'] 
- 
        apstndb revised this gist Jun 3, 2019 . 1 changed file with 22 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # it is not success because docker stopped step returns 137 steps: - name: google/cloud-sdk:248.0.0 args: ['gcloud', 'beta', 'emulators', 'datastore', 'start', '--host-port=0.0.0.0:8081'] - name: jwilder/dockerize:0.6.1 id: dockerize args: ['dockerize', '-timeout=60s', '-wait=tcp://step_0:8081'] waitFor: ['-'] - name: gcr.io/cloud-builders/docker args: ['ps'] waitFor: ['dockerize'] - name: google/cloud-sdk:248.0.0 id: main env: - DATASTORE_EMULATOR_HOST=step_0:8081 args: ['sh', '-c', 'curl $${DATASTORE_EMULATOR_HOST}/v1/projects/example-project/indexes'] waitFor: ['dockerize'] - name: gcr.io/cloud-builders/docker env: - DATASTORE_EMULATOR_HOST=step_0:8081 args: ['stop', "step_0"] waitFor: ['main'] 
- 
        apstndb revised this gist Jun 3, 2019 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,6 @@ steps: args: ['run', '-d', '--network=cloudbuild', '--name=cds-emulator', 'google/cloud-sdk:248.0.0', 'gcloud', 'beta', 'emulators', 'datastore', 'start', '--host-port=0.0.0.0:8081'] - name: jwilder/dockerize:0.6.1 args: ['dockerize', '-timeout=60s', '-wait=tcp://cds-emulator:8081'] - name: google/cloud-sdk:248.0.0 env: - DATASTORE_EMULATOR_HOST=cds-emulator:8081 
- 
        apstndb revised this gist Jun 3, 2019 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,11 @@ steps: - name: gcr.io/cloud-builders/docker args: ['run', '-d', '--network=cloudbuild', '--name=cds-emulator', 'google/cloud-sdk:248.0.0', 'gcloud', 'beta', 'emulators', 'datastore', 'start', '--host-port=0.0.0.0:8081'] - name: jwilder/dockerize:0.6.1 args: ['dockerize', '-timeout=60s', '-wait=tcp://cds-emulator:8081'] - name: gcr.io/cloud-builders/docker args: ['ps'] - name: google/cloud-sdk:248.0.0 env: - DATASTORE_EMULATOR_HOST=cds-emulator:8081 args: ['sh', '-c', 'curl $${DATASTORE_EMULATOR_HOST}/v1/projects/example-project/indexes'] 
- 
        apstndb created this gist Jun 3, 2019 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ ``` cloud-build-local --config=cloudbuild.yaml --dryrun=false . ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ steps: - name: gcr.io/cloud-builders/docker id: cds-emulator args: ['run', '-d', '--network=cloudbuild', '--name=cds-emulator', 'google/cloud-sdk:248.0.0', 'gcloud', 'beta', 'emulators', 'datastore', 'start', '--host-port=0.0.0.0:8081'] - name: jwilder/dockerize:0.6.1 id: dockerize args: ['dockerize', '-timeout=60s', '-wait=tcp://cds-emulator:8081'] - name: gcr.io/cloud-builders/docker args: ['ps'] - name: google/cloud-sdk:248.0.0 id: main env: - DATASTORE_EMULATOR_HOST=cds-emulator:8081 args: ['sh', '-c', 'curl $${DATASTORE_EMULATOR_HOST}/v1/projects/example-project/indexes'] - name: gcr.io/cloud-builders/docker args: ['rm', '--force', 'cds-emulator']