Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockefilegradlebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:8-jdk-alpine
WORKDIR /
ADD build/libs/mybankatm_rel1.jar /mybankatm_rel1.jar
EXPOSE 7000
CMD ["java", "-jar", "mybankatm_rel1.jar"]
48 changes: 48 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,40 @@ buildscript {
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2")
classpath('gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.13.0')
}
}

group = 'springio'



apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'org.springframework.boot'
apply plugin: 'org.sonarqube'
apply plugin: 'com.palantir.docker'

jar {
baseName = 'mybankatm'
version = '0.0.1'
}

docker {
dependsOn build
name "indragopi86/${jar.baseName}"
files jar.archivePath
buildArgs(['JAR_FILE': "${jar.archiveName}"])
}

repositories {
mavenCentral()
Expand All @@ -29,10 +55,32 @@ dependencies {
compile('org.apache.commons:commons-lang3:3.7')
compile('io.springfox:springfox-swagger-ui:2.8.0')
compile('io.springfox:springfox-swagger2:2.8.0')
compile('org.sonarsource.java:sonar-java-plugin:3.13.1')
compile('org.sonarsource.sonarqube:sonar-scanner-engine:5.5-RC2')

runtime('com.h2database:h2')

testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.mockito:mockito-core:2.18.0')
testCompile group: 'junit', name: 'junit', version: '4.+'

}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.2
}
}
}
}
task applicationCodeCoverageReport(type:JacocoReport){
executionData test
sourceSets sourceSets.main
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
172 changes: 172 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.