From d4a00e35c43a7238ef043a1001d227700d089d40 Mon Sep 17 00:00:00 2001 From: Sergey Yelin Date: Tue, 30 Jun 2020 17:00:29 +0300 Subject: [PATCH 1/4] IS-964: Add security pipeline --- build_utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_utils b/build_utils index 4e6aae0..1aa7267 160000 --- a/build_utils +++ b/build_utils @@ -1 +1 @@ -Subproject commit 4e6aae0f31885d3c56d09c72de7ef8d432149dbf +Subproject commit 1aa72677e975fc0604818362c595dcf84d27c4f0 From d7b682608e253a8c2815f684bbd91836e3259beb Mon Sep 17 00:00:00 2001 From: Sergey Yelin Date: Tue, 30 Jun 2020 17:54:06 +0300 Subject: [PATCH 2/4] IS-964: Add secirity tools to pipeline --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6b8072c..c21afb3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,6 +57,7 @@ build('kds', 'docker-host', finalHook) { } } } finally { + runErlSecurityTools() runStage('rm local image') { sh 'make rm_local_image' } From 5e2b0e5ace73397c3f9c10ea60e0f8cea62c9a7e Mon Sep 17 00:00:00 2001 From: Sergey Yelin Date: Tue, 7 Jul 2020 14:02:31 +0300 Subject: [PATCH 3/4] Switch to Erlang service pipe --- Jenkinsfile | 55 +++++------------------------------------------------ build_utils | 2 +- 2 files changed, 6 insertions(+), 51 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c21afb3..75e4340 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,5 @@ #!groovy +// -*- mode: groovy -*- def finalHook = { runStage('store CT logs') { @@ -10,58 +11,12 @@ build('kds', 'docker-host', finalHook) { checkoutRepo() loadBuildUtils() - def pipeDefault - def withWsCache + def pipeErlangService runStage('load pipeline') { env.JENKINS_LIB = "build_utils/jenkins_lib" - pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy") - withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy") + env.SH_TOOLS = "build_utils/sh" + pipeErlangService = load("${env.JENKINS_LIB}/pipeErlangService.groovy") } - pipeDefault() { - if (env.BRANCH_NAME != 'master') { - runStage('compile') { - withGithubPrivkey { - sh 'make wc_compile' - } - } - runStage('lint') { - sh 'make wc_lint' - } - runStage('xref') { - sh 'make wc_xref' - } - runStage('dialyze') { - withWsCache("_build/default/rebar3_22.3.1_plt") { - sh 'make wc_dialyze' - } - } - runStage('test') { - sh "make wc_test" - } - } - - runStage('make release') { - withGithubPrivkey { - sh "make wc_release" - } - } - runStage('build image') { - sh "make build_image" - } - - try { - if (masterlikeBranch()) { - runStage('push image') { - sh "make push_image" - } - } - } finally { - runErlSecurityTools() - runStage('rm local image') { - sh 'make rm_local_image' - } - } - } + pipeErlangService.runPipe(true, true) } - diff --git a/build_utils b/build_utils index 1aa7267..91587cc 160000 --- a/build_utils +++ b/build_utils @@ -1 +1 @@ -Subproject commit 1aa72677e975fc0604818362c595dcf84d27c4f0 +Subproject commit 91587cccf7f5dbb2b0ccf4ca3b838b22c8c588a0 From b955d027d7c22399e51207387fed871b03291efb Mon Sep 17 00:00:00 2001 From: Sergey Yelin Date: Tue, 7 Jul 2020 15:59:03 +0300 Subject: [PATCH 4/4] Fix tests --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 75e4340..c945ff5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,5 +18,5 @@ build('kds', 'docker-host', finalHook) { pipeErlangService = load("${env.JENKINS_LIB}/pipeErlangService.groovy") } - pipeErlangService.runPipe(true, true) + pipeErlangService.runPipe(false, true) }