From b87cccbea85de2b1373cdf3af5edf717df687892 Mon Sep 17 00:00:00 2001 From: Soren Mathiasen Date: Mon, 13 Nov 2017 08:23:40 +0100 Subject: [PATCH 1/4] renamed migration, so they make sense --- migrations/1_add_repositories_down.sql | 1 + migrations/{1_add_tables_up.sql => 1_add_repositories_up.sql} | 0 migrations/1_add_tables_down.sql | 0 migrations/2_add_tables_down.sql | 0 migrations/2_builds_down.sql | 1 + migrations/{2_add_tables_up.sql => 2_builds_up.sql} | 0 6 files changed, 2 insertions(+) create mode 100644 migrations/1_add_repositories_down.sql rename migrations/{1_add_tables_up.sql => 1_add_repositories_up.sql} (100%) delete mode 100644 migrations/1_add_tables_down.sql delete mode 100644 migrations/2_add_tables_down.sql create mode 100644 migrations/2_builds_down.sql rename migrations/{2_add_tables_up.sql => 2_builds_up.sql} (100%) diff --git a/migrations/1_add_repositories_down.sql b/migrations/1_add_repositories_down.sql new file mode 100644 index 0000000..bc9ca32 --- /dev/null +++ b/migrations/1_add_repositories_down.sql @@ -0,0 +1 @@ +DROP TABLE repositories; \ No newline at end of file diff --git a/migrations/1_add_tables_up.sql b/migrations/1_add_repositories_up.sql similarity index 100% rename from migrations/1_add_tables_up.sql rename to migrations/1_add_repositories_up.sql diff --git a/migrations/1_add_tables_down.sql b/migrations/1_add_tables_down.sql deleted file mode 100644 index e69de29..0000000 diff --git a/migrations/2_add_tables_down.sql b/migrations/2_add_tables_down.sql deleted file mode 100644 index e69de29..0000000 diff --git a/migrations/2_builds_down.sql b/migrations/2_builds_down.sql new file mode 100644 index 0000000..b78dbfe --- /dev/null +++ b/migrations/2_builds_down.sql @@ -0,0 +1 @@ +DROP TABLE BUILDS; \ No newline at end of file diff --git a/migrations/2_add_tables_up.sql b/migrations/2_builds_up.sql similarity index 100% rename from migrations/2_add_tables_up.sql rename to migrations/2_builds_up.sql -- GitLab From d769ce340023fd01813896aae62989de79ee1551 Mon Sep 17 00:00:00 2001 From: Soren Mathiasen Date: Mon, 13 Nov 2017 08:25:23 +0100 Subject: [PATCH 2/4] renamed chart to seneferu --- charts/ci-server/Chart.yaml | 5 ----- charts/seneferu/Chart.yaml | 5 +++++ .../{ci-server => seneferu}/templates/_helpers.tpl | 0 .../templates/configmap.yaml | 2 +- .../templates/deployment.yaml | 14 +++++++------- .../tests/test-service-responds-on-9001.yaml | 2 +- charts/{ci-server => seneferu}/values.yaml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) delete mode 100755 charts/ci-server/Chart.yaml create mode 100755 charts/seneferu/Chart.yaml rename charts/{ci-server => seneferu}/templates/_helpers.tpl (100%) rename charts/{ci-server => seneferu}/templates/configmap.yaml (76%) rename charts/{ci-server => seneferu}/templates/deployment.yaml (81%) rename charts/{ci-server => seneferu}/templates/tests/test-service-responds-on-9001.yaml (81%) rename charts/{ci-server => seneferu}/values.yaml (72%) diff --git a/charts/ci-server/Chart.yaml b/charts/ci-server/Chart.yaml deleted file mode 100755 index a2923c1..0000000 --- a/charts/ci-server/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -description: CI server -name: ci-server -version: 0.1.0 - diff --git a/charts/seneferu/Chart.yaml b/charts/seneferu/Chart.yaml new file mode 100755 index 0000000..db4690b --- /dev/null +++ b/charts/seneferu/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +description: Seneferu CI server +name: seneferu +version: 0.1.0 + diff --git a/charts/ci-server/templates/_helpers.tpl b/charts/seneferu/templates/_helpers.tpl similarity index 100% rename from charts/ci-server/templates/_helpers.tpl rename to charts/seneferu/templates/_helpers.tpl diff --git a/charts/ci-server/templates/configmap.yaml b/charts/seneferu/templates/configmap.yaml similarity index 76% rename from charts/ci-server/templates/configmap.yaml rename to charts/seneferu/templates/configmap.yaml index 0afe20f..de4f8b8 100755 --- a/charts/ci-server/templates/configmap.yaml +++ b/charts/seneferu/templates/configmap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-ci-server-env-config + name: {{ .Release.Name }}-seneferu-env-config namespace: default data: DEBUG: "{{ default true .Values.debug }}" diff --git a/charts/ci-server/templates/deployment.yaml b/charts/seneferu/templates/deployment.yaml similarity index 81% rename from charts/ci-server/templates/deployment.yaml rename to charts/seneferu/templates/deployment.yaml index fb18a82..c261198 100755 --- a/charts/ci-server/templates/deployment.yaml +++ b/charts/seneferu/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1beta1 kind: Deployment metadata: - name: ci-server + name: seneferu labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" annotations: @@ -14,7 +14,7 @@ spec: template: metadata: labels: - service: ci-server + service: seneferu annotations: # add random string, to force re-start of pods. random-string: {{ randAlphaNum 15 }} @@ -22,22 +22,22 @@ spec: containers: - envFrom: - configMapRef: - name: {{ .Release.Name }}-ci-server-env-config + name: {{ .Release.Name }}-seneferu-env-config image: {{ .Values.image.name }}:{{ .Values.image.tag }} imagePullPolicy: Always - name: ci-server + name: seneferu restartPolicy: Always --- apiVersion: v1 kind: Service metadata: labels: - service: ci-server - name: ci-server + service: seneferu + name: seneferu spec: type: LoadBalancer ports: - name: http port: 8080 selector: - service: ci-server + service: seneferu diff --git a/charts/ci-server/templates/tests/test-service-responds-on-9001.yaml b/charts/seneferu/templates/tests/test-service-responds-on-9001.yaml similarity index 81% rename from charts/ci-server/templates/tests/test-service-responds-on-9001.yaml rename to charts/seneferu/templates/tests/test-service-responds-on-9001.yaml index 3810caf..7c2ef1e 100755 --- a/charts/ci-server/templates/tests/test-service-responds-on-9001.yaml +++ b/charts/seneferu/templates/tests/test-service-responds-on-9001.yaml @@ -8,5 +8,5 @@ spec: containers: - name: start-test image: byrnedo/alpine-curl:latest - command: ["/usr/bin/curl", "http://ci-server:8080/"] + command: ["/usr/bin/curl", "http://seneferu:8080/"] restartPolicy: Never diff --git a/charts/ci-server/values.yaml b/charts/seneferu/values.yaml similarity index 72% rename from charts/ci-server/values.yaml rename to charts/seneferu/values.yaml index 1e57c82..138e3ff 100755 --- a/charts/ci-server/values.yaml +++ b/charts/seneferu/values.yaml @@ -2,4 +2,4 @@ replicaCount: 1 image: tag: latest - name: sorenmat/ci-server \ No newline at end of file + name: sorenmat/seneferu \ No newline at end of file -- GitLab From f9adf6e068654ab635fd4d70576b0a1ff0f978e1 Mon Sep 17 00:00:00 2001 From: Soren Mathiasen Date: Mon, 13 Nov 2017 08:26:08 +0100 Subject: [PATCH 3/4] Remove pocs directory --- pocs/main.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 pocs/main.go diff --git a/pocs/main.go b/pocs/main.go deleted file mode 100644 index 45983c2..0000000 --- a/pocs/main.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "fmt" - "k8s.io/helm/pkg/helm" -) - -type Deployment struct { - Version string `json:"version"` - Name string `json:"name"` - Status string `json:"status"` - Description string `json:"description"` -} - -func main() { - client := helm.NewClient(helm.Host("localhost:44134")) - - _, err := client.GetVersion() - if err != nil { - fmt.Println(err) - } - - s := "my-release" - status, err := client.ReleaseStatus(s) - if err != nil { - fmt.Println(err) - } - - fmt.Println("Status: ", status.Info) - list, err := client.ReleaseHistory(s, helm.WithMaxHistory(10)) - if err != nil { - fmt.Println(err) - } - - fmt.Printf("->%v\n", list) - for _, v := range list.GetReleases() { - - fmt.Printf("%v\t%v\t%v\t%v\n", v.Version, v.Name, v.GetInfo().Status.Code, v.Info.Description) - - } - -} -- GitLab From 5c089af64f8492a9eb05dc843868f6e16422efce Mon Sep 17 00:00:00 2001 From: Soren Mathiasen Date: Mon, 13 Nov 2017 08:29:22 +0100 Subject: [PATCH 4/4] Remove old web UI, and make the new one default --- Dockerfile | 2 - index.html | 100 +++++++++++++++++++++++++++++------------------ index_new.html | 74 ----------------------------------- styles/style.css | 49 ----------------------- web/web.go | 1 - 5 files changed, 61 insertions(+), 165 deletions(-) mode change 100755 => 100644 index.html delete mode 100644 index_new.html delete mode 100755 styles/style.css diff --git a/Dockerfile b/Dockerfile index 79c4af5..e2dfc16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,6 @@ ADD scripts/ scripts ADD images/ images ADD styles/ styles ADD index.html index.html -ADD index_new.html index_new.html - ADD seneferu /seneferu ENTRYPOINT ["/seneferu"] diff --git a/index.html b/index.html old mode 100755 new mode 100644 index 4ff673a..f9ae7e7 --- a/index.html +++ b/index.html @@ -1,52 +1,74 @@ + - - - - - - - - - + + + + + + + + + + + + + + + + + + -
-

Seneferu build dashboard

-
-
-
-
-
-

- Repositories: -

-
-
-
+
+
+ +
+
+
+
-
-
- +
+
+
+ +
+ SELECT A BUILD STEP TO SEE WHAT HAPPENS IN THERE :-O
-
-
-
-
+
+ + - \ No newline at end of file + diff --git a/index_new.html b/index_new.html deleted file mode 100644 index f9ae7e7..0000000 --- a/index_new.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-
- -
-
-
-
- -
- SELECT A BUILD STEP TO SEE WHAT HAPPENS IN THERE :-O -
-
-
-
-
-
- - - - diff --git a/styles/style.css b/styles/style.css deleted file mode 100755 index f958f00..0000000 --- a/styles/style.css +++ /dev/null @@ -1,49 +0,0 @@ -html { - background-color: white; - background-repeat: no-repeat; - background-size: cover; - background-position: center; -} - -body { - background: transparent; - padding-top: 15px; -} - -.glyphicon-remove { - color: red; -} - -.glyphicon-ok { - color: green; -} - -.container > h1 { - width: 100%; - color: black; -} - -.build-panel > panel-body { - max-height: 400px; - overflow: scroll; -} - -.output { - font-family: "Courier New", Courier, monospace; -} - -.output-panelbody { - height: 400px; - max-height: 400px; - overflow: scroll; -} - -::-webkit-scrollbar { - background-color: #fff; - width: 10px; -} - -::-webkit-scrollbar-thumb { - -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.2); - border-radius: 8px; -} \ No newline at end of file diff --git a/web/web.go b/web/web.go index 3b7f758..9977204 100644 --- a/web/web.go +++ b/web/web.go @@ -97,7 +97,6 @@ func StartWebServer(db storage.Service, kubectl *kubernetes.Clientset, secret st e.Static("/scripts", "scripts") e.Static("/images", "images") e.File("/", "index.html") - e.File("/v2", "index_new.html") e.GET("/status", handleStatus()) e.GET("/repos", handleFetchRepos(db)) e.GET("/repo/:org/:id", handleFetchRepoData(db)) -- GitLab