From 57f6b35a06a224ebf6b2527470069df645e5ca93 Mon Sep 17 00:00:00 2001 From: "n.pospolita" Date: Tue, 6 Aug 2019 17:04:55 +0300 Subject: [PATCH] Init with rbk-templator --- .gitignore | 78 +++++++++ .gitmodules | 4 + Jenkinsfile | 18 ++ build_utils | 1 + pom.xml | 162 ++++++++++++++++++ .../shumpune/ShumpuneApplication.java | 15 ++ src/main/resources/application.yml | 19 ++ .../shumpune/ShumpuneApplicationTest.java | 16 ++ src/test/resources/logback-test.xml | 10 ++ 9 files changed, 323 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Jenkinsfile create mode 160000 build_utils create mode 100644 pom.xml create mode 100644 src/main/java/com/rbkmoney/shumpune/ShumpuneApplication.java create mode 100644 src/main/resources/application.yml create mode 100644 src/test/java/com/rbkmoney/shumpune/ShumpuneApplicationTest.java create mode 100644 src/test/resources/logback-test.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fb08ff7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,78 @@ +# Created by .ignore support plugin (hsz.mobi) +.eunit +deps +*.o +*.beam +*.plt +erl_crash.dump +ebin/*.beam +rel/example_project +.concrete/DEV_MODE +.rebar +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/ +.idea/workspace.xml +.idea/tasks.xml +.idea/dictionaries +.idea/vcs.xml +.idea/jsLibraryMappings.xml + +# Sensitive or high-churn files: +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml + +# Gradle: +.idea/gradle.xml +.idea/libraries + +# Mongo Explorer plugin: +.idea/mongoSettings.xml + +*.iws +*.ipr +*.iml + + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +env.list diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ca5a761 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "build_utils"] + path = build_utils + url = git@github.com:rbkmoney/build_utils.git + branch = master diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..6a1ad0d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,18 @@ +#!groovy +build('shumpune', 'java-maven') { + checkoutRepo() + loadBuildUtils() + + def javaServicePipeline + runStage('load JavaService pipeline') { + javaServicePipeline = load("build_utils/jenkins_lib/pipeJavaService.groovy") + } + + def serviceName = env.REPO_NAME + def mvnArgs = '-DjvmArgs="-Xmx256m"' + def useJava11 = true + def registry = 'dr2.rbkmoney.com' + def registryCredsId = 'jenkins_harbor' + + javaServicePipeline(serviceName, useJava11, mvnArgs, registry, registryCredsId) +} \ No newline at end of file diff --git a/build_utils b/build_utils new file mode 160000 index 0000000..b9b18f3 --- /dev/null +++ b/build_utils @@ -0,0 +1 @@ +Subproject commit b9b18f3ee375aa5fd105daf57189ac242c40f572 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..86fa22c --- /dev/null +++ b/pom.xml @@ -0,0 +1,162 @@ + + + 4.0.0 + + + com.rbkmoney + spring-boot-starter-parent + 2.1.1.RELEASE + + + shumpune + 0.0.1-SNAPSHOT + jar + + Shumpune + Better shumway + + + UTF-8 + UTF-8 + 11 + 8022 + ${server.port} + bc95d0d6dc13c693acd2b274531a7d604b877bf3 + ${env.REGISTRY} + 0.3.6 + ${project.basedir}/../target/jacoco.exec + + + + + + com.rbkmoney + spring-boot-starter-metrics-statsd + 1.1.0 + + + com.rbkmoney.woody + woody-thrift + 1.1.15 + + + com.rbkmoney + shared-resources + ${shared.resources.version} + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + org.hibernate + hibernate-validator + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + javax.servlet + javax.servlet-api + 4.0.1 + + + org.projectlombok + lombok + 1.18.4 + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + ${project.build.directory}/maven-shared-archive-resources + ${project.build.directory} + + Dockerfile + + true + + + ${project.build.directory}/maven-shared-archive-resources + true + + Dockerfile + + + + src/main/resources + true + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.1.RELEASE + + + org.apache.maven.plugins + maven-remote-resources-plugin + 1.6.0 + + + org.apache.maven.shared + maven-filtering + 1.3 + + + + + com.rbkmoney:shared-resources:${shared.resources.version} + + false + false + + + + + process + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.2 + + ${sonar.jacoco.reportPath} + true + + + + agent + + prepare-agent + + + + + + + diff --git a/src/main/java/com/rbkmoney/shumpune/ShumpuneApplication.java b/src/main/java/com/rbkmoney/shumpune/ShumpuneApplication.java new file mode 100644 index 0000000..14a06d2 --- /dev/null +++ b/src/main/java/com/rbkmoney/shumpune/ShumpuneApplication.java @@ -0,0 +1,15 @@ +package com.rbkmoney.shumpune; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletComponentScan; + +@ServletComponentScan +@SpringBootApplication +public class ShumpuneApplication extends SpringApplication { + + public static void main(String[] args) { + SpringApplication.run(ShumpuneApplication.class, args); + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..48f389f --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,19 @@ +server: + port: @server.port@ +management: + security: + flag: false + metrics: + export: + statsd: + flavor: etsy + enabled: false +spring: + application: + name: @project.name@ + output: + ansi: + enabled: always +info: + version: @project.version@ + stage: dev diff --git a/src/test/java/com/rbkmoney/shumpune/ShumpuneApplicationTest.java b/src/test/java/com/rbkmoney/shumpune/ShumpuneApplicationTest.java new file mode 100644 index 0000000..f28143f --- /dev/null +++ b/src/test/java/com/rbkmoney/shumpune/ShumpuneApplicationTest.java @@ -0,0 +1,16 @@ +package com.rbkmoney.shumpune; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ShumpuneApplication.class) +public class ShumpuneApplicationTest { + + @Test + public void contextLoads() { + + } +} diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..e1f57ed --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,10 @@ + + + + + + + + + +