Skip to content

Instantly share code, notes, and snippets.

@ivamluz
Created July 27, 2020 23:56
Show Gist options
  • Save ivamluz/1d6a31780605b87ac7dd507916dc509f to your computer and use it in GitHub Desktop.
Save ivamluz/1d6a31780605b87ac7dd507916dc509f to your computer and use it in GitHub Desktop.
Script for testing the Pub/Sub-triggered deployed function
#! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "${DIR}/.env.local"
MESSAGE=$1
ATTRIBUTES=$2
gcloud pubsub topics \
publish ${PUBSUB_TOPIC} \
--message "${MESSAGE}" \
--attribute "${ATTRIBUTES}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment