aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-10-23 13:16:05 -0400
committerGitHub <noreply@github.com>2019-10-23 13:16:05 -0400
commit267176954fbfcab087cf269acc0155dae7a21fc8 (patch)
tree1be734b354fedd41794988ffaf8b81bf1b56957d
parentfae0178698db7b98d77ba67af2cf4a4446c2e5e6 (diff)
downloadxesite-267176954fbfcab087cf269acc0155dae7a21fc8.tar.xz
xesite-267176954fbfcab087cf269acc0155dae7a21fc8.zip
Update/go1.13.3 (#87)
* Update to go 1.13.3, remove old files, ping bing/google search * remove old lines, oops
-rw-r--r--.github/workflows/kubernetes-cd.yml11
-rw-r--r--Dockerfile5
-rw-r--r--app.json7
-rw-r--r--app/CHECKS1
-rw-r--r--k8s/job.yml31
-rwxr-xr-xrun.sh4
-rwxr-xr-xscripts/deploy.sh7
-rwxr-xr-xscripts/setupremote.sh6
8 files changed, 43 insertions, 29 deletions
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