From d6a9e16705a0b476f60f12c072561b3aac50f84b Mon Sep 17 00:00:00 2001 From: Viktor Farcic Date: Wed, 20 May 2020 16:08:45 +0200 Subject: [PATCH 1/2] This is a PR --- charts/go-demo-6/Makefile | 2 +- charts/preview/Makefile | 2 +- charts/preview/values.yaml | 8 ++++++++ main.go | 2 +- main_test.go | 2 +- skaffold.yaml | 28 ---------------------------- 6 files changed, 12 insertions(+), 32 deletions(-) diff --git a/charts/go-demo-6/Makefile b/charts/go-demo-6/Makefile index 065274768..e3896d9c3 100755 --- a/charts/go-demo-6/Makefile +++ b/charts/go-demo-6/Makefile @@ -36,7 +36,7 @@ ifeq ($(OS),Darwin) sed -i "" -e "s/tag:.*/tag: $(VERSION)/" values.yaml else ifeq ($(OS),Linux) sed -i -e "s/version:.*/version: $(VERSION)/" Chart.yaml - sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/devops-26\/$(NAME)|" values.yaml + sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/jx-demo-276816\/$(NAME)|" values.yaml sed -i -e "s/tag:.*/tag: $(VERSION)/" values.yaml else echo "platfrom $(OS) not supported to tag with" diff --git a/charts/preview/Makefile b/charts/preview/Makefile index 7663503a3..a59f778e9 100755 --- a/charts/preview/Makefile +++ b/charts/preview/Makefile @@ -8,7 +8,7 @@ ifeq ($(OS),Darwin) else ifeq ($(OS),Linux) sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml - sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/devops-26\/go-demo-6|" values.yaml + sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/jx-demo-276816\/go-demo-6|" values.yaml sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml else echo "platfrom $(OS) not supported to release from" diff --git a/charts/preview/values.yaml b/charts/preview/values.yaml index bbdb0d32b..788ea38d0 100755 --- a/charts/preview/values.yaml +++ b/charts/preview/values.yaml @@ -21,3 +21,11 @@ preview: tag: pullPolicy: IfNotPresent probePath: /demo/hello?health=true + + +db: + enabled: false + +preview-db: + persistence: + enabled: false diff --git a/main.go b/main.go index ae6c64614..bf388a979 100644 --- a/main.go +++ b/main.go @@ -92,7 +92,7 @@ func HelloServer(w http.ResponseWriter, req *http.Request) { delayNum, _ := strconv.Atoi(delay) sleep(time.Duration(delayNum) * time.Millisecond) } - io.WriteString(w, "hello, devpod with tests!\n") + io.WriteString(w, "hello, PR!\n") } func RandomErrorServer(w http.ResponseWriter, req *http.Request) { diff --git a/main_test.go b/main_test.go index f2f7ddccd..6ea073a0b 100644 --- a/main_test.go +++ b/main_test.go @@ -88,7 +88,7 @@ func (s *MainTestSuite) Test_HelloServer_WritesHelloWorld() { HelloServer(w, req) - w.AssertCalled(s.T(), "Write", []byte("hello, devpod with tests!\n")) + w.AssertCalled(s.T(), "Write", []byte("hello, PR!\n")) } func (s *MainTestSuite) Test_HelloServer_Waits_WhenDelayIsPresent() { diff --git a/skaffold.yaml b/skaffold.yaml index 7eaa482fe..e69de29bb 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -1,28 +0,0 @@ -apiVersion: skaffold/v1beta2 -kind: Config -build: - artifacts: - - image: devops-26/go-demo-6 - context: . - docker: {} - tagPolicy: - envTemplate: - template: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}:{{.VERSION}}' - local: {} -deploy: - kubectl: {} -profiles: -- name: dev - build: - tagPolicy: - envTemplate: - template: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}:{{.DIGEST_HEX}}' - local: {} - deploy: - helm: - releases: - - name: go-demo-6 - chartPath: charts/go-demo-6 - setValueTemplates: - image.repository: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}' - image.tag: '{{.DIGEST_HEX}}' From ad484b4025a699d876861d94165e080022b0f9be Mon Sep 17 00:00:00 2001 From: Viktor Farcic Date: Wed, 20 May 2020 16:11:45 +0200 Subject: [PATCH 2/2] This is a PR --- main.go | 2 +- main_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index bf388a979..f464806e2 100644 --- a/main.go +++ b/main.go @@ -92,7 +92,7 @@ func HelloServer(w http.ResponseWriter, req *http.Request) { delayNum, _ := strconv.Atoi(delay) sleep(time.Duration(delayNum) * time.Millisecond) } - io.WriteString(w, "hello, PR!\n") + io.WriteString(w, "hello, PR not again!\n") } func RandomErrorServer(w http.ResponseWriter, req *http.Request) { diff --git a/main_test.go b/main_test.go index 6ea073a0b..f942b2683 100644 --- a/main_test.go +++ b/main_test.go @@ -88,7 +88,7 @@ func (s *MainTestSuite) Test_HelloServer_WritesHelloWorld() { HelloServer(w, req) - w.AssertCalled(s.T(), "Write", []byte("hello, PR!\n")) + w.AssertCalled(s.T(), "Write", []byte("hello, PR not again!\n")) } func (s *MainTestSuite) Test_HelloServer_Waits_WhenDelayIsPresent() {