I hereby claim:
- I am ivamluz on github.
- I am ivamluz (https://keybase.io/ivamluz) on keybase.
- I have a public key ASAF4-9VJHfurF23oGUjRbdCuPFYVwbIgZ5QkdPj0N0UtAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
> ./test-deployed-pubsub.sh "Hello, Pub/Sub!" "foo=bar,bar=baz,attr=value" | |
Publishing 'Hello, Pub/Sub!' message with foo=bar,bar=baz,attr=value attributes to builder-functions-demo-topic | |
messageIds: | |
- '1399123306686402' |
> ./test-deployed-http.sh | |
Sending GET request to https://<region>-<project-id>.cloudfunctions.net/sample_http?subject=FooBar | |
HTTP/2 200 | |
content-type: text/html; charset=utf-8 | |
function-execution-id: nm07fwaspcwl | |
x-cloud-trace-context: b607a137968b883068619c9bed376b4d;o=1 | |
date: Tue, 28 Jul 2020 00:19:48 GMT | |
server: Google Frontend | |
content-length: 14 |
import base64 | |
import pprint as pp | |
from flask import current_app, escape | |
def sample_http(request): | |
"""HTTP Cloud Function. | |
Args: | |
request (flask.Request): The request object. | |
<http://flask.pocoo.org/docs/1.0/api/#flask.Request> |
#! /bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
source "${DIR}/.env.local" | |
MESSAGE=$1 | |
ATTRIBUTES=$2 | |
gcloud pubsub topics \ |
#! /bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
SOURCE_DIR="${DIR}/../src" | |
source "${DIR}/.env.local" | |
TRIGGER_URL=$( | |
gcloud functions \ | |
describe ${FUNCTION_NAME_HTTP} \ |
#! /bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
SOURCE_DIR="${DIR}/../src" | |
source "${DIR}/.env.local" | |
gcloud functions \ | |
deploy ${FUNCTION_NAME_PUBSUB} \ | |
--source=${SOURCE_DIR} \ |
#! /bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
SOURCE_DIR="${DIR}/../src" | |
source "${DIR}/.env.local" | |
gcloud functions \ | |
deploy ${FUNCTION_NAME_HTTP} \ | |
--source=${SOURCE_DIR} \ |
steps: | |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk" | |
args: ["./scripts/deploy-http.sh"] | |
waitFor: ["-"] | |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk" | |
args: ["./scripts/deploy-pubsub.sh"] | |
waitFor: ["-"] |
Script path: venv/bin/functions-framework | |
Parameters: --source=src/main.py --target=${FUNCTION_NAME_HTTP} --signature-type=http --port=${FUNCTION_PORT_HTTP} --debug | |
Environment variables: PYTHONUNBUFFERED=1 | |
Working directory: /home/iluz/Projects/Personal/cloud-build-cloud-functions-pipeline/ |