Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,46 @@ jobs:
- run:
name: "Say hello"
command: "echo Hello, World!"
build_and_deploy:
docker:
- image: 'cimg/base:stable'
steps:
- checkout
- cloudrun/init
- cloudrun/build:
tag: 'gcr.io/${GOOGLE_PROJECT_ID}/test-${CIRCLE_SHA1}'
- cloudrun/deploy:
image: 'gcr.io/${GOOGLE_PROJECT_ID}/test-${CIRCLE_SHA1}'
platform: managed
region: eu-west1
service-name: example-service
unauthenticated: true
- run:
command: >
# A simple example of how a deployed managed service could be
verified or further tested.

# This step will send request our "API" and fail if there is
unexpected output.

GCP_API_RESULTS=$(curl -s "$GCP_DEPLOY_ENDPOINT")

if [ "$GCP_API_RESULTS" != "Hello World!" ]; then
echo "Result is unexpected"
echo 'Result: '
curl -s "$GCP_DEPLOY_ENDPOINT"
exit 1;
fi
name: Test managed deployed service.

orbs:
cloudrun: circleci/[email protected]
workflows:
build_and_deploy_to_managed_workflow:
jobs:
- build_and_deploy
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
say-hello-workflow:
jobs:
- say-hello
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ hs_err_pid*
*.DS_Store
node_modules/*
node_modules
node_modules/.package-lock.json

.vscode
.idea
build/
dist/