From 5bf3663b1976d9e840035d6bd112b2b5f937db53 Mon Sep 17 00:00:00 2001 From: gkirok Date: Wed, 3 Apr 2019 20:20:19 +0300 Subject: [PATCH 1/2] DEVOPS-272 add Jenkinsfile, Makefile --- Jenkinsfile | 37 +++++++++++++++++++++++++++++++++++++ Makefile | 6 ++++++ 2 files changed, 43 insertions(+) create mode 100644 Jenkinsfile create mode 100644 Makefile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..68b3f04 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,37 @@ +label = "${UUID.randomUUID().toString()}" +git_project = "spark-ui-proxy" +git_project_user = "v3io" +git_project_upstream_user = "v3io" +git_deploy_user = "iguazio-prod-git-user" +git_deploy_user_token = "iguazio-prod-git-user-token" +git_deploy_user_private_key = "iguazio-prod-git-user-private-key" + +podTemplate(label: "${git_project}-${label}", inheritFrom: "jnlp-docker-golang") { + node("${git_project}-${label}") { + pipelinex = library(identifier: 'pipelinex@refs', retriever: modernSCM( + [$class : 'GitSCMSource', + credentialsId: git_deploy_user_private_key, + remote : "git@github.com:iguazio/pipelinex.git"])).com.iguazio.pipelinex + common.notify_slack { + withCredentials([ + string(credentialsId: git_deploy_user_token, variable: 'GIT_TOKEN') + ]) { + github.release(git_deploy_user, git_project, git_project_user, git_project_upstream_user, true, GIT_TOKEN) { + stage("build ${git_project} in dood") { + container('docker-cmd') { + dir("${github.BUILD_FOLDER}/src/github.com/${git_project_upstream_user}/${git_project}") { + common.shellc("SPARK_UI_PROXY_TAG=${github.DOCKER_TAG_VERSION} SPARK_UI_PROXY_REPOSITORY='' make build") + } + } + } + + stage('push') { + container('docker-cmd') { + dockerx.images_push_multi_registries(["${git_project}:${github.DOCKER_TAG_VERSION}"], [pipelinex.DockerRepo.ARTIFACTORY_IGUAZIO, pipelinex.DockerRepo.DOCKER_HUB, pipelinex.DockerRepo.QUAY_IO]) + } + } + } + } + } + } +} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..52d4920 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +SPARK_UI_PROXY_TAG ?= latest +SPARK_UI_PROXY_REPOSITORY ?= v3io/ + +.PHONY: build +build: + docker build --tag=$(SPARK_UI_PROXY_REPOSITORY)spark-ui-proxy:$(SPARK_UI_PROXY_TAG) . From 17f384bd640e0d53b43782659e7a4996eb2458c5 Mon Sep 17 00:00:00 2001 From: gkirok Date: Mon, 6 Jan 2020 10:16:45 +0200 Subject: [PATCH 2/2] Development (#6) * DEVOPS-272 add Jenkinsfile, Makefile * IG-12749: Remove healthz success logging (#4) Co-authored-by: urihoenig --- spark-ui-proxy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spark-ui-proxy.py b/spark-ui-proxy.py index 0c78dc0..09033d0 100644 --- a/spark-ui-proxy.py +++ b/spark-ui-proxy.py @@ -89,6 +89,11 @@ def do_POST(self): postData = self.rfile.read(length) self.proxyRequest(postData) + def log_request(self, code='-', size='-'): + if "GET /healthz" in self.requestline and 200 == code: + return + super(ProxyHandler, self).log_request(code, size) + def proxyRequest(self, data): targetHost, path = self.extractUrlDetails(self.path) targetUrl = "http://" + targetHost + path