This file contains hidden or 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
""" | |
An example Flask app that uses Exceptions to return errors to clients | |
""" | |
from flask import Flask, jsonify | |
app = Flask(__name__) | |
class APIError(Exception): | |
"""All custom API Exceptions""" |
This file contains hidden or 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
FROM gcr.io/cloud-builders/gcloud | |
RUN apt-get -y update && \ | |
apt-get -y install python3 python3-dev python3-setuptools python3-pip | |
RUN pip3 install PyYAML Jinja2 simplejson kubernetes \ | |
google-cloud-storage google-api-python-client | |
RUN apt-get -y remove python-dev python-setuptools wget && \ | |
rm -rf /var/lib/apt/lists/* && \ |
This file contains hidden or 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
############################################################################################ | |
# A sample Terraform file that creates the cloud build trigger. | |
############################################################################################ | |
resource "google_cloudbuild_trigger" "develop_trigger" { | |
description = "[DEVELOP] Build develop branch" | |
filename = "cloudbuild.yaml" | |
trigger_template { | |
branch_name = "^develop$" | |
repo_name = "houston" | |
} |
This file contains hidden or 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
# Change namespace: | |
kubectl config set-context --current --namespace= | |
# Run a Debug container. Remember to add namespace | |
kubectl run -it --rm --restart=Never alpine --image=alpine sh | |
## The in alpine run | |
apk add curl |