Skip to content

Commit

Permalink
Removing buildcop binary after deploy script and buildURL edits
Browse files Browse the repository at this point in the history
  • Loading branch information
dinagraves committed Jul 16, 2020
1 parent 45cf310 commit 08c8151
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion helloworld-shell/tests.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
- id: 'Get Cloud Run URL'
name: 'gcr.io/cloud-builders/gcloud:$_CLOUDSDK_VERSION'
entrypoint: /bin/bashhhh
entrypoint: /bin/bash
args:
- '-c'
- |
Expand All @@ -44,6 +44,7 @@ steps:
- '-c'
- |
echo "Add integration tests!"
exit 1
- id: 'Teardown'
name: 'gcr.io/cloud-builders/gcloud:$_CLOUDSDK_VERSION'
Expand Down
Binary file removed testing/buildcop-function/buildcop
Binary file not shown.
6 changes: 5 additions & 1 deletion testing/buildcop-function/deploy_function.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ cp $(go env GOPATH)/bin/linux_amd64/buildcop buildcop

# Deploy function
gcloud functions deploy buildcop-worker --region=us-central1 \
--trigger-topic=cloud-builds --runtime=python37 --entry-point=send_to_buildcop
--trigger-topic=cloud-builds --runtime=python37 --entry-point=send_to_buildcop \
--no-allow-unauthenticated

# Remove binary from current directory
rm buildcop
2 changes: 1 addition & 1 deletion testing/buildcop-function/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def send_to_buildcop(event, context):
out = subprocess.run(
["./buildcop", "-repo=GoogleCloudPlatform/cloud-run-samples",
f"-commit_hash={commit_sha}", "-logs_dir=/tmp",
f"buildURL={build_url}"],
f"-build_url={build_url}"],
stdout=subprocess.PIPE).stdout
except Exception as e:
print(e)

0 comments on commit 08c8151

Please sign in to comment.