From 24c968035af0aefdf4b7c775b00da94e98b270f6 Mon Sep 17 00:00:00 2001 From: Lilit Ghazaryan Date: Wed, 5 Dec 2018 13:14:34 +0100 Subject: [PATCH] Migrate logging, monitoring, kubeless tests to Prow (#1922) * Migrate logging, monitoring, kubeless tests to Prow --- tests/kubeless-integration/Gopkg.lock | 29 ++++++++++++++++++++ tests/kubeless-integration/Gopkg.toml | 25 +++++++++++++++++ tests/kubeless-integration/Jenkinsfile | 4 +++ tests/kubeless-integration/Makefile | 33 +++++++++++++++++++++++ tests/kubeless/Gopkg.lock | 29 ++++++++++++++++++++ tests/kubeless/Gopkg.toml | 25 +++++++++++++++++ tests/kubeless/Jenkinsfile | 4 +++ tests/kubeless/Makefile | 33 +++++++++++++++++++++++ tests/logging/Gopkg.lock | 29 ++++++++++++++++++++ tests/logging/Gopkg.toml | 25 +++++++++++++++++ tests/logging/Jenkinsfile | 4 +++ tests/logging/Makefile | 33 +++++++++++++++++++++++ tests/test-logging-monitoring/Gopkg.lock | 29 ++++++++++++++++++++ tests/test-logging-monitoring/Gopkg.toml | 25 +++++++++++++++++ tests/test-logging-monitoring/Jenkinsfile | 4 +++ tests/test-logging-monitoring/Makefile | 33 +++++++++++++++++++++++ 16 files changed, 364 insertions(+) create mode 100644 tests/kubeless-integration/Gopkg.lock create mode 100644 tests/kubeless-integration/Gopkg.toml create mode 100644 tests/kubeless-integration/Makefile create mode 100644 tests/kubeless/Gopkg.lock create mode 100644 tests/kubeless/Gopkg.toml create mode 100644 tests/kubeless/Makefile create mode 100644 tests/logging/Gopkg.lock create mode 100644 tests/logging/Gopkg.toml create mode 100644 tests/logging/Makefile create mode 100644 tests/test-logging-monitoring/Gopkg.lock create mode 100644 tests/test-logging-monitoring/Gopkg.toml create mode 100644 tests/test-logging-monitoring/Makefile diff --git a/tests/kubeless-integration/Gopkg.lock b/tests/kubeless-integration/Gopkg.lock new file mode 100644 index 000000000000..031a1118cfa3 --- /dev/null +++ b/tests/kubeless-integration/Gopkg.lock @@ -0,0 +1,29 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "travis-1.9" + name = "github.com/golang/lint" + packages = [ + ".", + "golint" + ] + revision = "883fe33ffc4344bad1ecd881f61afd5ec5d80e0a" + +[[projects]] + branch = "master" + name = "golang.org/x/tools" + packages = [ + "go/ast/astutil", + "go/gcexportdata", + "go/internal/gcimporter", + "go/types/typeutil" + ] + revision = "22934f0fdb6201c132a3dc6120150dcb1646d74c" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "eac9aff91777620e36bab609338e0127d29380e8cd3dca17c081e30625590f64" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/tests/kubeless-integration/Gopkg.toml b/tests/kubeless-integration/Gopkg.toml new file mode 100644 index 000000000000..89bd6465ea34 --- /dev/null +++ b/tests/kubeless-integration/Gopkg.toml @@ -0,0 +1,25 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + +required = [ + "github.com/golang/lint/golint" +] \ No newline at end of file diff --git a/tests/kubeless-integration/Jenkinsfile b/tests/kubeless-integration/Jenkinsfile index 54b44d237d98..c13ee46f6d02 100644 --- a/tests/kubeless-integration/Jenkinsfile +++ b/tests/kubeless-integration/Jenkinsfile @@ -53,6 +53,10 @@ podTemplate(label: label, } } + stage("install dependencies $application") { + execute("make resolve", workDir, componentDir) + } + stage("code quality $application") { execute("make validate", workDir, componentDir) } diff --git a/tests/kubeless-integration/Makefile b/tests/kubeless-integration/Makefile new file mode 100644 index 000000000000..750e004b6cc4 --- /dev/null +++ b/tests/kubeless-integration/Makefile @@ -0,0 +1,33 @@ +APP_NAME = kubeless-integration-tests +IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(APP_NAME) +TAG = $(DOCKER_TAG) + + +resolve: + dep ensure -vendor-only -v + +validate: + go build -o golint-vendored ./vendor/github.com/golang/lint/golint + ./golint-vendored + rm golint-vendored + +build: + go generate ./... + CGO_ENABLED=0 go build -o ./bin/app $(buildpath) + +build-image: + docker build -t $(APP_NAME):latest . + +push-image: + docker tag $(APP_NAME) $(IMG):$(TAG) + docker push $(IMG):$(TAG) + +.PHONY: ci-pr +ci-pr: resolve validate build build-image push-image + +.PHONY: ci-master +ci-master: resolve validate build build-image push-image + +.PHONY: ci-release +ci-release: resolve validate build build-image push-image + diff --git a/tests/kubeless/Gopkg.lock b/tests/kubeless/Gopkg.lock new file mode 100644 index 000000000000..938a481aa1b8 --- /dev/null +++ b/tests/kubeless/Gopkg.lock @@ -0,0 +1,29 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "travis-1.9" + name = "github.com/golang/lint" + packages = [ + ".", + "golint" + ] + revision = "883fe33ffc4344bad1ecd881f61afd5ec5d80e0a" + +[[projects]] + branch = "master" + name = "golang.org/x/tools" + packages = [ + "go/ast/astutil", + "go/gcexportdata", + "go/internal/gcimporter", + "go/types/typeutil" + ] + revision = "e5f3ab76ea4b26ebea349e4994ee72d38250c9b0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "eac9aff91777620e36bab609338e0127d29380e8cd3dca17c081e30625590f64" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/tests/kubeless/Gopkg.toml b/tests/kubeless/Gopkg.toml new file mode 100644 index 000000000000..89bd6465ea34 --- /dev/null +++ b/tests/kubeless/Gopkg.toml @@ -0,0 +1,25 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + +required = [ + "github.com/golang/lint/golint" +] \ No newline at end of file diff --git a/tests/kubeless/Jenkinsfile b/tests/kubeless/Jenkinsfile index d5ecba79104e..3193461de74b 100644 --- a/tests/kubeless/Jenkinsfile +++ b/tests/kubeless/Jenkinsfile @@ -53,6 +53,10 @@ podTemplate(label: label, } } + stage("install dependencies $application") { + execute("make resolve", workDir, componentDir) + } + stage("code quality $application") { execute("make validate", workDir, componentDir) } diff --git a/tests/kubeless/Makefile b/tests/kubeless/Makefile new file mode 100644 index 000000000000..1d701749d2b3 --- /dev/null +++ b/tests/kubeless/Makefile @@ -0,0 +1,33 @@ +APP_NAME = kubeless-tests +IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(APP_NAME) +TAG = $(DOCKER_TAG) + + +resolve: + dep ensure -vendor-only -v + +validate: + go build -o golint-vendored ./vendor/github.com/golang/lint/golint + ./golint-vendored + rm golint-vendored + +build: + go generate ./... + CGO_ENABLED=0 go build -o ./bin/app $(buildpath) + +build-image: + docker build -t $(APP_NAME):latest . + +push-image: + docker tag $(APP_NAME) $(IMG):$(TAG) + docker push $(IMG):$(TAG) + +.PHONY: ci-pr +ci-pr: resolve validate build build-image push-image + +.PHONY: ci-master +ci-master: resolve validate build build-image push-image + +.PHONY: ci-release +ci-release: resolve validate build build-image push-image + diff --git a/tests/logging/Gopkg.lock b/tests/logging/Gopkg.lock new file mode 100644 index 000000000000..031a1118cfa3 --- /dev/null +++ b/tests/logging/Gopkg.lock @@ -0,0 +1,29 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "travis-1.9" + name = "github.com/golang/lint" + packages = [ + ".", + "golint" + ] + revision = "883fe33ffc4344bad1ecd881f61afd5ec5d80e0a" + +[[projects]] + branch = "master" + name = "golang.org/x/tools" + packages = [ + "go/ast/astutil", + "go/gcexportdata", + "go/internal/gcimporter", + "go/types/typeutil" + ] + revision = "22934f0fdb6201c132a3dc6120150dcb1646d74c" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "eac9aff91777620e36bab609338e0127d29380e8cd3dca17c081e30625590f64" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/tests/logging/Gopkg.toml b/tests/logging/Gopkg.toml new file mode 100644 index 000000000000..89bd6465ea34 --- /dev/null +++ b/tests/logging/Gopkg.toml @@ -0,0 +1,25 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + +required = [ + "github.com/golang/lint/golint" +] \ No newline at end of file diff --git a/tests/logging/Jenkinsfile b/tests/logging/Jenkinsfile index 025046242819..ae891fc515e9 100644 --- a/tests/logging/Jenkinsfile +++ b/tests/logging/Jenkinsfile @@ -53,6 +53,10 @@ podTemplate(label: label, } } + stage("install dependencies $application") { + execute("make resolve", workDir, componentDir) + } + stage("code quality $application") { execute("make validate", workDir, componentDir) } diff --git a/tests/logging/Makefile b/tests/logging/Makefile new file mode 100644 index 000000000000..752a1825ab78 --- /dev/null +++ b/tests/logging/Makefile @@ -0,0 +1,33 @@ +APP_NAME = logging-tests +IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(APP_NAME) +TAG = $(DOCKER_TAG) + + +resolve: + dep ensure -vendor-only -v + +validate: + go build -o golint-vendored ./vendor/github.com/golang/lint/golint + ./golint-vendored + rm golint-vendored + +build: + go generate ./... + CGO_ENABLED=0 go build -o ./bin/app $(buildpath) + +build-image: + docker build -t $(APP_NAME):latest . + +push-image: + docker tag $(APP_NAME) $(IMG):$(TAG) + docker push $(IMG):$(TAG) + +.PHONY: ci-pr +ci-pr: resolve validate build build-image push-image + +.PHONY: ci-master +ci-master: resolve validate build build-image push-image + +.PHONY: ci-release +ci-release: resolve validate build build-image push-image + diff --git a/tests/test-logging-monitoring/Gopkg.lock b/tests/test-logging-monitoring/Gopkg.lock new file mode 100644 index 000000000000..031a1118cfa3 --- /dev/null +++ b/tests/test-logging-monitoring/Gopkg.lock @@ -0,0 +1,29 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "travis-1.9" + name = "github.com/golang/lint" + packages = [ + ".", + "golint" + ] + revision = "883fe33ffc4344bad1ecd881f61afd5ec5d80e0a" + +[[projects]] + branch = "master" + name = "golang.org/x/tools" + packages = [ + "go/ast/astutil", + "go/gcexportdata", + "go/internal/gcimporter", + "go/types/typeutil" + ] + revision = "22934f0fdb6201c132a3dc6120150dcb1646d74c" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "eac9aff91777620e36bab609338e0127d29380e8cd3dca17c081e30625590f64" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/tests/test-logging-monitoring/Gopkg.toml b/tests/test-logging-monitoring/Gopkg.toml new file mode 100644 index 000000000000..89bd6465ea34 --- /dev/null +++ b/tests/test-logging-monitoring/Gopkg.toml @@ -0,0 +1,25 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + +required = [ + "github.com/golang/lint/golint" +] \ No newline at end of file diff --git a/tests/test-logging-monitoring/Jenkinsfile b/tests/test-logging-monitoring/Jenkinsfile index 718721a837ef..024c69b19894 100644 --- a/tests/test-logging-monitoring/Jenkinsfile +++ b/tests/test-logging-monitoring/Jenkinsfile @@ -53,6 +53,10 @@ podTemplate(label: label, } } + stage("install dependencies $application") { + execute("make resolve", workDir, componentDir) + } + stage("code quality $application") { execute("make validate", workDir, componentDir) } diff --git a/tests/test-logging-monitoring/Makefile b/tests/test-logging-monitoring/Makefile new file mode 100644 index 000000000000..ca3195880973 --- /dev/null +++ b/tests/test-logging-monitoring/Makefile @@ -0,0 +1,33 @@ +APP_NAME = test-logging-monitoring +IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(APP_NAME) +TAG = $(DOCKER_TAG) + + +resolve: + dep ensure -vendor-only -v + +validate: + go build -o golint-vendored ./vendor/github.com/golang/lint/golint + ./golint-vendored + rm golint-vendored + +build: + go generate ./... + CGO_ENABLED=0 go build -o ./bin/app $(buildpath) + +build-image: + docker build -t $(APP_NAME):latest . + +push-image: + docker tag $(APP_NAME) $(IMG):$(TAG) + docker push $(IMG):$(TAG) + +.PHONY: ci-pr +ci-pr: resolve validate build build-image push-image + +.PHONY: ci-master +ci-master: resolve validate build build-image push-image + +.PHONY: ci-release +ci-release: resolve validate build build-image push-image +