diff --git a/.gcloudignore b/.gcloudignore deleted file mode 100644 index 277c4511..00000000 --- a/.gcloudignore +++ /dev/null @@ -1 +0,0 @@ -# empty so .gitignore isn't included diff --git a/README.md b/README.md index 51d0c5d1..86bd2980 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,5 @@ # sqlfmt + Experimental SQL formatter with width-aware output Based on http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf. - -Requires having the master branch of https://github.com/cockroachdb/cockroach checked out at `$GOPATH/src/github.com/cockroachdb/cockroach`, and running `make` in that directory. - -# Deployment - -To deploy: - -1. Ensure your kubectl creds for the desired cluster are present. - * See https://github.com/cockroachlabs/h2hello -2. Run `./build.sh` -3. If everything went well, kill current pods so they will be redeployed from the new docker image: -`kubectl get po | grep sqlfmt | awk '{print $1}' | xargs kubectl delete pod` - * Note that this will work only if your branch is the same branch used by - the service. You can use the below command to set the image: - * `kubectl set image deployment/sqlfmt sqlfmt=gcr.io/cockroach-dev-inf/cockroachlabs/sqlfmt:master` - -Note that step 8 will only work if you're on the master branch. diff --git a/build.sh b/build.sh deleted file mode 100644 index 0e8acd79..00000000 --- a/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -set -ex - -GOOS=linux GOARCH=amd64 go build -o sqlfmt -BRANCH=$(git symbolic-ref --short HEAD) -SHA=$(git rev-parse --short HEAD) -gcloud --project cockroach-dev-inf builds submit --substitutions=BRANCH_NAME=$BRANCH,SHORT_SHA=$SHA --config cloudbuild.yaml - -# kubectl get po | grep sqlfmt | awk '{print $1}' | xargs kubectl delete po diff --git a/cloudbuild.yaml b/cloudbuild.yaml deleted file mode 100644 index 8ff60525..00000000 --- a/cloudbuild.yaml +++ /dev/null @@ -1,10 +0,0 @@ -steps: -- name: 'gcr.io/cloud-builders/docker' - args: [ 'build', - '-t', 'gcr.io/$PROJECT_ID/cockroachlabs/sqlfmt:$BRANCH_NAME', - '-t', 'gcr.io/$PROJECT_ID/cockroachlabs/sqlfmt:$SHORT_SHA', - '.' - ] -images: -- 'gcr.io/$PROJECT_ID/cockroachlabs/sqlfmt:$BRANCH_NAME' -- 'gcr.io/$PROJECT_ID/cockroachlabs/sqlfmt:$SHORT_SHA' diff --git a/sqlfmt.yaml b/sqlfmt.yaml deleted file mode 100644 index 6f46a884..00000000 --- a/sqlfmt.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: sqlfmt - name: sqlfmt -spec: - replicas: 2 - selector: - matchLabels: - app: sqlfmt - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: sqlfmt - spec: - containers: - - image: gcr.io/cockroach-dev-inf/cockroachlabs/sqlfmt:master - imagePullPolicy: Always - name: sqlfmt - env: - - name: SQLFMT_ADDR - value: ":80" - ports: - - containerPort: 80 - protocol: TCP - name: http ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: sqlfmt - name: sqlfmt -spec: - externalTrafficPolicy: Cluster - ports: - - name: http - port: 80 - protocol: TCP - targetPort: http - selector: - app: sqlfmt - type: NodePort