Skip to content

Commit

Permalink
Raw removed and readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mchmarny committed Nov 23, 2018
1 parent 59ab665 commit 6460891
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ topic:

table:
bq mk $(BQ_SCHEMA_NAME)
bq mk --schema id:string,repo:string,type:string,actor:string,event_time:timestamp,countable:boolean,raw:record -t $(BQ_SCHEMA_NAME).$(BQ_TABLE_NAME)
bq mk --schema id:string,repo:string,type:string,actor:string,event_time:timestamp,countable:boolean -t $(BQ_SCHEMA_NAME).$(BQ_TABLE_NAME)

job:
gcloud beta dataflow jobs run $(GCP_FN_NAME)-$(RUN_ID) \
Expand Down
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,39 @@ First you will need to create a pubsub topic where `github-activity-counter` wil
make topic
```

Then, you will need to define secret that will be shared between GitHub and your Function. Best to use an auto-generated, opaque, string. You can generate 32 character long string using `openssl` like this:
Create BigQuery table

```shell
make table
```

Create Dataflow job to load data from PubSub topic to BigQuery table

```shell
make job
```

Define secret that will be shared between GitHub and your Function. Best to use an auto-generated, opaque, string. You can generate 32 character long string using `openssl` like this:

```shell
openssl rand -base64 32
```

You will then need to set that secrete as an `HOOK_SECRET` system variable or define it in the `Makefile`
Set that secrete as an `HOOK_SECRET` system variable or define it in the `Makefile`

Now you can deploy the function to GCF
Deploy the function to GCF

```shell
make deploy
```

The response from the deployment will be
The response from the deployment will be...

```shell
Deploying function (may take a while - up to 2 minutes)
```
Followed by metadata about your function. The one we need to capture will be the URL of your function. Should look like this:
...followed by metadata about your function. The one we need to capture will be the URL of your function. Should look like this:
```shell
httpsTrigger:
Expand Down

0 comments on commit 6460891

Please sign in to comment.