This repository was archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Phil Prasek <[email protected]>
- Loading branch information
Showing
17 changed files
with
456 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
#!/bin/bash | ||
|
||
eval "$(cat graph-api.env)" | ||
if [[ -z "${APOLLO_KEY}" ]]; then | ||
if ls graph-api.env > /dev/null 2>&1; then | ||
eval "$(cat graph-api.env)" | ||
fi | ||
|
||
if [[ -z "${APOLLO_KEY}" || -z "${APOLLO_GRAPH_REF}" ]]; then | ||
source "$(dirname $0)/graph-api-env.sh" | ||
eval "$(cat graph-api.env)" | ||
|
||
if [[ -z "${APOLLO_KEY}" ]]; then | ||
echo ------------------------------------------------------------------------------------------- | ||
echo environment keyfile required, run: make graph-api-key | ||
echo APOLLO_KEY not found, run: make graph-api-env | ||
echo ------------------------------------------------------------------------------------------- | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${APOLLO_GRAPH_REF}" ]]; then | ||
echo ------------------------------------------------------------------------------------------- | ||
echo APOLLO_GRAPH_REF not found, run: make graph-api-env | ||
echo ------------------------------------------------------------------------------------------- | ||
exit 1 | ||
fi | ||
fi | ||
|
||
export APOLLO_KEY=$APOLLO_KEY | ||
export APOLLO_GRAPH_REF=$APOLLO_GRAPH_REF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
if ls graph-api.env > /dev/null 2>&1; then | ||
eval "$(cat graph-api.env)" | ||
fi | ||
|
||
echo ------------------------------------------------------------------------------------------- | ||
echo Enter your Graph API Key | ||
echo ------------------------------------------------------------------------------------------- | ||
echo "Go to your graph settings in https://studio.apollographql.com/" | ||
echo "then create a Graph API Key with Contributor permissions" | ||
echo "(for metrics reporting) and enter it at the prompt below." | ||
|
||
if [[ -n "$APOLLO_KEY" ]]; then | ||
echo "" | ||
echo "press <enter> to use existing key: *************** (from ./graph-api.env)" | ||
fi | ||
|
||
read -s -p "> " key | ||
echo | ||
if [[ -z "$key" ]]; then | ||
if [[ -n "$APOLLO_KEY" ]]; then | ||
key=$APOLLO_KEY | ||
else | ||
>&2 echo "Error: no key specified." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
echo "APOLLO_KEY=${key}" > graph-api.env | ||
|
||
# -------------------------------------------------------------------------- | ||
# APOLLO_GRAPH_REF | ||
# -------------------------------------------------------------------------- | ||
echo "" | ||
if [[ -z "${graph}" ]]; then | ||
source "$(dirname $0)/get-graph-ref.sh" | ||
fi | ||
|
||
echo "APOLLO_GRAPH_REF=${graph}" >> graph-api.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
.scripts/k8s-up.sh $1 | ||
.scripts/k8s-smoke.sh | ||
.scripts/k8s-smoke.sh $1 | ||
code=$? | ||
.scripts/k8s-down.sh | ||
exit $code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.