From 267176954fbfcab087cf269acc0155dae7a21fc8 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 23 Oct 2019 13:16:05 -0400 Subject: [PATCH] Update/go1.13.3 (#87) * Update to go 1.13.3, remove old files, ping bing/google search * remove old lines, oops --- .github/workflows/kubernetes-cd.yml | 11 ++++++++++ Dockerfile | 5 +---- app.json | 7 ------- app/CHECKS | 1 - k8s/job.yml | 31 +++++++++++++++++++++++++++++ run.sh | 4 ---- scripts/deploy.sh | 7 ------- scripts/setupremote.sh | 6 ------ 8 files changed, 43 insertions(+), 29 deletions(-) delete mode 100644 app.json delete mode 100644 app/CHECKS create mode 100644 k8s/job.yml delete mode 100755 run.sh delete mode 100755 scripts/deploy.sh delete mode 100755 scripts/setupremote.sh diff --git a/.github/workflows/kubernetes-cd.yml b/.github/workflows/kubernetes-cd.yml index 9737ba3..2127691 100644 --- a/.github/workflows/kubernetes-cd.yml +++ b/.github/workflows/kubernetes-cd.yml @@ -62,3 +62,14 @@ jobs: uses: docker://lachlanevenson/k8s-kubectl with: args: --kubeconfig=/github/workspace/.kubeconfig rollout status -n apps deployment/christinewebsite + - name: Ping Google + uses: docker://lachlanevenson/k8s-kubectl + with: + args: --kubeconfig=/github/workspace/.kubeconfig apply -f /github/workspace/k8s/job/yml + - name: Sleep + run: | + sleep 5 + - name: Don't Ping Google + uses: docker://lachlanevenson/k8s-kubectl + with: + args: --kubeconfig=/github/workspace/.kubeconfig delete -f /github/workspace/k8s/job/yml diff --git a/Dockerfile b/Dockerfile index 2e82e78..0551fc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM xena/go:1.12.6 AS build +FROM xena/go:1.13.3 AS build ENV GOPROXY https://cache.greedo.xeserv.us COPY . /site WORKDIR /site @@ -7,7 +7,6 @@ RUN CGO_ENABLED=0 GOBIN=/root go install -v ./cmd/site FROM xena/alpine EXPOSE 5000 -RUN apk add --no-cache bash WORKDIR /site COPY --from=build /root/site . COPY ./static /site/static @@ -15,7 +14,5 @@ COPY ./templates /site/templates COPY ./blog /site/blog COPY ./talks /site/talks COPY ./css /site/css -COPY ./app /app -COPY ./app.json . HEALTHCHECK CMD wget --spider http://127.0.0.1:5000/.within/health || exit 1 CMD ./site diff --git a/app.json b/app.json deleted file mode 100644 index 9d7a7a1..0000000 --- a/app.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "scripts": { - "dokku": { - "postdeploy": "curl https://www.google.com/ping?sitemap=https://christine.website/sitemap.xml" - } - } -} diff --git a/app/CHECKS b/app/CHECKS deleted file mode 100644 index adfecdb..0000000 --- a/app/CHECKS +++ /dev/null @@ -1 +0,0 @@ -/ Christine \ No newline at end of file diff --git a/k8s/job.yml b/k8s/job.yml new file mode 100644 index 0000000..e5cf4eb --- /dev/null +++ b/k8s/job.yml @@ -0,0 +1,31 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: christinewebsite-ping + namespace: apps + labels: + app: christinewebsite +spec: + template: + spec: + containers: + - name: ping-bing + image: xena/alpine + command: + - "busybox" + - "wget" + - "-O" + - "-" + - "-q" + - "https://www.bing.com/ping?sitemap=https://christine.website/sitemap.xml" + - name: ping-google + image: xena/alpine + command: + - "busybox" + - "wget" + - "-O" + - "-" + - "-q" + - "https://www.google.com/ping?sitemap=https://christine.website/sitemap.xml" + restartPolicy: Never + backoffLimit: 4 diff --git a/run.sh b/run.sh deleted file mode 100755 index 1bf4f0d..0000000 --- a/run.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd /site -./site diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100755 index 40776d4..0000000 --- a/scripts/deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e -set -x - -docker build . -git push dokku master diff --git a/scripts/setupremote.sh b/scripts/setupremote.sh deleted file mode 100755 index 14c4480..0000000 --- a/scripts/setupremote.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -set -e -set -x - -git remote add dokku dokku@minipaas.xeserv.us:christine