From 9d36059549197d0905c2c25e30695cdbbfd2db2a Mon Sep 17 00:00:00 2001 From: "k.struzhkin" Date: Mon, 29 Jun 2020 13:12:21 +0300 Subject: [PATCH] Init commit --- .gitignore | 78 ++++++++ .gitmodules | 4 + Jenkinsfile | 18 ++ build_utils | 1 + pom.xml | 167 ++++++++++++++++++ .../FraudbustersMgConnectorApplication.java | 15 ++ src/main/resources/application.yml | 22 +++ ...raudbustersMgConnectorApplicationTest.java | 16 ++ src/test/resources/logback-test.xml | 10 ++ 9 files changed, 331 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/fraudbustersmgconnector/FraudbustersMgConnectorApplication.java create mode 100644 src/main/resources/application.yml create mode 100644 src/test/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplicationTest.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..4d6921c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,18 @@ +#!groovy +build('fraudbusters-mg-connector', '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..1aa7267 --- /dev/null +++ b/build_utils @@ -0,0 +1 @@ +Subproject commit 1aa72677e975fc0604818362c595dcf84d27c4f0 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..d0da11e --- /dev/null +++ b/pom.xml @@ -0,0 +1,167 @@ + + + 4.0.0 + + + com.rbkmoney + spring-boot-starter-parent + 2.1.1.RELEASE + + + fraudbusters-mg-connector + 0.0.1-SNAPSHOT + jar + + Fraudbusters mg connector + + + + 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 + custom-actuator-endpoints + 0.0.1 + + + 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.5 + + ${sonar.jacoco.reportPaths} + true + + + + agent + + prepare-agent + + + + + + + diff --git a/src/main/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplication.java b/src/main/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplication.java new file mode 100644 index 0000000..c500de8 --- /dev/null +++ b/src/main/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplication.java @@ -0,0 +1,15 @@ +package com.rbkmoney.fraudbustersmgconnector; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletComponentScan; + +@ServletComponentScan +@SpringBootApplication +public class FraudbustersMgConnectorApplication extends SpringApplication { + + public static void main(String[] args) { + SpringApplication.run(FraudbustersMgConnectorApplication.class, args); + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..bc77e66 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,22 @@ +server: + port: '@server.port@' + +management: + security: + flag: false + metrics: + export: + statsd: + enabled: false + flavor: etsy + endpoint.health.show-details: always + +spring: + application: + name: '@project.name@' + output: + ansi: + enabled: always +info: + version: '@project.version@' + stage: dev diff --git a/src/test/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplicationTest.java b/src/test/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplicationTest.java new file mode 100644 index 0000000..987773d --- /dev/null +++ b/src/test/java/com/rbkmoney/fraudbustersmgconnector/FraudbustersMgConnectorApplicationTest.java @@ -0,0 +1,16 @@ +package com.rbkmoney.fraudbustersmgconnector; + +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 = FraudbustersMgConnectorApplication.class) +public class FraudbustersMgConnectorApplicationTest { + + @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 @@ + + + + + + + + + +