Skip to content

Instantly share code, notes, and snippets.

@lucassabreu
Last active May 4, 2017 00:45
Show Gist options
  • Save lucassabreu/f44b72cd1c0e62976ba0e0dfcfe819ed to your computer and use it in GitHub Desktop.
Save lucassabreu/f44b72cd1c0e62976ba0e0dfcfe819ed to your computer and use it in GitHub Desktop.
v3.1
if [ ! -z $GITHUB_TOKEN ] && [ "$ENV" != "production" ] && [ "$ENV" != "staging" ]; then
echo ">> Registering $ENV deployment..."
ID_DEPLOYMENT=$(k8s/github-deployment "lucassabreu/k8s-pr-envs" "$GITHUB_TOKEN" create "$ENV" "$ENV" true | jq ".id")
RETURN=$(k8s/github-deployment "lucassabreu/k8s-pr-envs" "$GITHUB_TOKEN" status set "$ID_DEPLOYMENT" success "http://$HOSTNAME/" "$LOG_URL")
if [ "$(echo $RETURN | jq ".message")" != "null" ]; then
echo $RETURN
exit 1
fi
fi
echo "Enviroment $ENV deployed to: http://$HOSTNAME/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment