From bae38573d4c6c7dd334b976ca3790215b053881d Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Tue, 13 Nov 2018 15:56:35 +0100 Subject: [PATCH 1/9] Added publishing of Docker image to production build. --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index eb963a8..7826809 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,6 +36,12 @@ node('nimble-jenkins-slave') { } if (env.BRANCH_NAME == 'master') { + + stage('Push Docker') { + sh 'mvn -f data-aggregation-service/pom.xml docker:push -DdockerImageTag=latest' + sh 'mvn -f data-aggregation-service/pom.xml docker:push' + } + stage('Deploy') { sh 'ssh nimble "cd /data/deployment_setup/prod/ && sudo ./run-prod.sh restart-single data-aggregation-service"' } From 340a32300e68a4f31b97487318bec32506a6d999 Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Tue, 13 Nov 2018 15:56:59 +0100 Subject: [PATCH 2/9] Set version to 5.0.0. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7112970..f34ab5b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ - 5.0.0-Staging + 5.0.0 From 6a788aede281cee954623c77f38f3f61a66b8357 Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Mon, 19 Nov 2018 13:42:51 +0100 Subject: [PATCH 3/9] Added FMP deployment to production build pipeline. --- Jenkinsfile | 6 +++++- libs/common | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7826809..46f263e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,8 +42,12 @@ node('nimble-jenkins-slave') { sh 'mvn -f data-aggregation-service/pom.xml docker:push' } - stage('Deploy') { + stage('Deploy MVP') { sh 'ssh nimble "cd /data/deployment_setup/prod/ && sudo ./run-prod.sh restart-single data-aggregation-service"' } + + stage('Deploy FMP') { + sh 'ssh fmp-prod "cd /srv/nimble-fmp/ && ./run-fmp-prod.sh restart-single data-aggregation-service"' + } } } \ No newline at end of file diff --git a/libs/common b/libs/common index 5442b04..f418e7e 160000 --- a/libs/common +++ b/libs/common @@ -1 +1 @@ -Subproject commit 5442b04bf9dadc4f09d9948dd8776fd0b877fdef +Subproject commit f418e7ea5d45dbaa061d305329334887ee1d368e From 87a5a4070f290d7b3fcdf9765f4baa21944a158d Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Mon, 26 Nov 2018 11:49:29 +0100 Subject: [PATCH 4/9] changed log level of infrastructure components --- .../src/main/resources/logback-spring.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data-aggregation-service/src/main/resources/logback-spring.xml b/data-aggregation-service/src/main/resources/logback-spring.xml index 1c2d4e7..c833efa 100755 --- a/data-aggregation-service/src/main/resources/logback-spring.xml +++ b/data-aggregation-service/src/main/resources/logback-spring.xml @@ -43,4 +43,8 @@ + + + + \ No newline at end of file From 9ff440373340d7adc8c1d72eb503271a6b1cde4f Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Mon, 26 Nov 2018 12:09:30 +0100 Subject: [PATCH 5/9] changed log level of infrastructure components --- data-aggregation-service/src/main/resources/logback-spring.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data-aggregation-service/src/main/resources/logback-spring.xml b/data-aggregation-service/src/main/resources/logback-spring.xml index c833efa..9dc3a12 100755 --- a/data-aggregation-service/src/main/resources/logback-spring.xml +++ b/data-aggregation-service/src/main/resources/logback-spring.xml @@ -47,4 +47,6 @@ + + \ No newline at end of file From 4e1d8483da3e9ee93a8966b8ed1cbb3ba4b7c2d2 Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Tue, 18 Dec 2018 10:56:11 +0100 Subject: [PATCH 6/9] Changed Jenkinsfile to support tag based releases. --- Jenkinsfile | 88 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46f263e..c455ee9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,23 +1,27 @@ node('nimble-jenkins-slave') { - stage('Clone and Update') { - git(url: 'https://github.com/nimble-platform/data-aggregation-service', branch: env.BRANCH_NAME) - } + // ----------------------------------------------- + // --------------- Staging Branch ---------------- + // ----------------------------------------------- + if (env.BRANCH_NAME == 'staging') { - stage('Build Dependencies') { - sh 'rm -rf common' - sh 'git clone https://github.com/nimble-platform/common' - dir('common') { - sh 'git checkout ' + env.BRANCH_NAME - sh 'mvn clean install' + stage('Clone and Update') { + git(url: 'https://github.com/nimble-platform/data-aggregation-service', branch: env.BRANCH_NAME) } - } - stage('Build Java') { - sh 'mvn clean package -DskipTests' - } + stage('Build Dependencies') { + sh 'rm -rf common' + sh 'git clone https://github.com/nimble-platform/common' + dir('common') { + sh 'git checkout ' + env.BRANCH_NAME + sh 'mvn clean install' + } + } + + stage('Build Java') { + sh 'mvn clean package -DskipTests' + } - if (env.BRANCH_NAME == 'staging') { stage('Build Docker') { sh 'mvn -f data-aggregation-service/pom.xml docker:build -DdockerImageTag=staging' } @@ -29,14 +33,62 @@ node('nimble-jenkins-slave') { stage('Deploy') { sh 'ssh staging "cd /srv/nimble-staging/ && ./run-staging.sh restart-single data-aggregation-service"' } - } else { - stage('Build Docker') { - sh 'mvn -f data-aggregation-service/pom.xml docker:build' - } } + // ----------------------------------------------- + // ---------------- Master Branch ---------------- + // ----------------------------------------------- if (env.BRANCH_NAME == 'master') { + stage('Clone and Update') { + git(url: 'https://github.com/nimble-platform/data-aggregation-service', branch: env.BRANCH_NAME) + } + + stage('Build Dependencies') { + sh 'rm -rf common' + sh 'git clone https://github.com/nimble-platform/common' + dir('common') { + sh 'git checkout ' + env.BRANCH_NAME + sh 'mvn clean install' + } + } + + stage('Build Java') { + sh 'mvn clean package -DskipTests' + } + } + + // ----------------------------------------------- + // ---------------- Release Tags ----------------- + // ----------------------------------------------- + if( env.TAG_NAME ==~ /^\d+.\d+.\d+$/) { + + stage('Clone and Update') { + git(url: 'https://github.com/nimble-platform/data-aggregation-service', branch: 'master') + } + + stage('Build Dependencies') { + sh 'rm -rf common' + sh 'git clone https://github.com/nimble-platform/common' + dir('common') { + sh 'git checkout master' + sh 'mvn clean install' + } + } + + stage('Set version') { + sh 'mvn versions:set -DnewVersion=' + env.TAG_NAME + sh 'mvn -f data-aggregation-service/pom.xml versions:set -DnewVersion=' + env.TAG_NAME + } + + stage('Build Java') { + sh 'mvn clean package -DskipTests' + } + + stage('Build Docker') { + sh 'mvn -f data-aggregation-service/pom.xml docker:build' + } + stage('Push Docker') { sh 'mvn -f data-aggregation-service/pom.xml docker:push -DdockerImageTag=latest' sh 'mvn -f data-aggregation-service/pom.xml docker:push' From f145d6bad834fff68c02300484238579db0229f6 Mon Sep 17 00:00:00 2001 From: Johannes Innerbichler Date: Tue, 18 Dec 2018 16:41:59 +0100 Subject: [PATCH 7/9] Changed version injection. --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c455ee9..afec7f9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,8 +77,8 @@ node('nimble-jenkins-slave') { } stage('Set version') { - sh 'mvn versions:set -DnewVersion=' + env.TAG_NAME - sh 'mvn -f data-aggregation-service/pom.xml versions:set -DnewVersion=' + env.TAG_NAME + sh 'mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=' + env.TAG_NAME + sh 'mvn -f data-aggregation-service/pom.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=' + env.TAG_NAME } stage('Build Java') { From ae982463bd1c79442c4b9432a5215a2a6d1c9b29 Mon Sep 17 00:00:00 2001 From: Akayeshmantha Date: Fri, 10 May 2019 18:16:27 +0200 Subject: [PATCH 8/9] Feign timeout. --- .../src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-aggregation-service/src/main/resources/application.properties b/data-aggregation-service/src/main/resources/application.properties index 3d4e526..ebf219f 100755 --- a/data-aggregation-service/src/main/resources/application.properties +++ b/data-aggregation-service/src/main/resources/application.properties @@ -11,4 +11,4 @@ spring.jackson.date-format=com.fasterxml.jackson.databind.util.ISO8601DateFormat spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false # This is feign client default timeout configuration -hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=5000 +hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=15000 From 73515c6d82aa43aaeb615201c6180fc7a75e7cf5 Mon Sep 17 00:00:00 2001 From: Akayeshmantha Date: Fri, 10 May 2019 18:29:56 +0200 Subject: [PATCH 9/9] Feign timeout. --- .../src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-aggregation-service/src/main/resources/application.properties b/data-aggregation-service/src/main/resources/application.properties index ebf219f..c3656ad 100755 --- a/data-aggregation-service/src/main/resources/application.properties +++ b/data-aggregation-service/src/main/resources/application.properties @@ -11,4 +11,4 @@ spring.jackson.date-format=com.fasterxml.jackson.databind.util.ISO8601DateFormat spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false # This is feign client default timeout configuration -hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=15000 +hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=20000