Skip to content

Commit

Permalink
[master] Add scripts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
4thel00z committed Oct 29, 2020
1 parent 2125644 commit d82b1f0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `/scripts`

Scripts to perform various build, install, analysis, etc operations.

These scripts keep the root level Makefile small and simple.

Examples:

* https://github.com/kubernetes/helm/tree/master/scripts
* https://github.com/cockroachdb/cockroach/tree/master/scripts
* https://github.com/hashicorp/terraform/tree/master/scripts
7 changes: 7 additions & 0 deletions scripts/before_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/sh

this_dir=$(dirname "$0")
export PREFIX=/usr/local
mkdir -p $PREFIX/go/src/webhookd $PREFIX/go/src/_/builds
cp -r $this_dir/../* $PREFIX/go/src/webhookd
ln -s $PREFIX/go/src/webhookd $PREFIX/go/src/_/builds/webhookd
9 changes: 9 additions & 0 deletions scripts/create_token.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash

curl --request POST \
--url $OAUTH_TOKEN_ENDPOINT \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data "client_id=$OAUTH_CLIENT_ID" \
--data client_secret=$OAUTH_CLIENT_SECRET \
--data audience=$OAUTH_AUDIENCE

0 comments on commit d82b1f0

Please sign in to comment.