From 126f0ea0f2d205dbaf04641d55e79ea265e20d18 Mon Sep 17 00:00:00 2001 From: marius Date: Tue, 8 Jan 2019 19:43:58 +0100 Subject: [PATCH] added Dockerfile and Maven build plugin for docker build process to unpack a fat Jar (for now) --- .gitlab-ci.yml | 9 +++++++- Dockerfile | 7 ++++++ pom.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98ab5e8..2e704b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,4 +4,11 @@ sonarqube_master_job: - master script: - mvn --batch-mode org.owasp:dependency-check-maven:check - - mvn --batch-mode verify sonar:sonar -D sonar.host.url=$SONAR_URL -D sonar.login=$SONAR_LOGIN -D sonar.dependencyCheck.reportPath=$DEP_CHECK_REPORT_PATH_XML -D sonar.dependencyCheck.htmlReportPath=$DEP_CHECK_REPORT_PATH_HTML \ No newline at end of file + - mvn --batch-mode verify sonar:sonar -D sonar.host.url=$SONAR_URL -D sonar.login=$SONAR_LOGIN -D sonar.dependencyCheck.reportPath=$DEP_CHECK_REPORT_PATH_XML -D sonar.dependencyCheck.htmlReportPath=$DEP_CHECK_REPORT_PATH_HTML + +dast_master_package_job: + stage: test + only: + - master + script: + - mvn --batch-mode package \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..90fe360 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM openjdk:8-jdk-alpine +VOLUME /tmp +ARG DEPENDENCY=target/dependency +COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib +COPY ${DEPENDENCY}/META-INF /app/META-INF +COPY ${DEPENDENCY}/BOOT-INF/classes /app +ENTRYPOINT ["java","-cp","app:app/lib/*","hello.Application"] \ No newline at end of file diff --git a/pom.xml b/pom.xml index 47ae049..83c315b 100644 --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,12 @@ 0.0.2 + + org.cryptable.zap + zap-maven-plugin + 1.6 + + @@ -74,6 +80,60 @@ ALL + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + + + + + + + org.cryptable.zap + mavenplugin + + 12345 + C:\Program Files\ZAProxy\zap.bat + localhost + 8080 + http://localhost/bodgeit + html + + + + startZAP + pre-integration-test + + start-zap + + + + porcessZAP + post-integration-test + + process-zap + + + + + + org.springframework.boot spring-boot-maven-plugin