Skip to content

Commit

Permalink
Initial Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Streichsbier committed Apr 21, 2017
1 parent 1f4bbe1 commit 0562163
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
_Store*
.idea/*
zap/tmp
.git
build/
.gradle
*.iml
*.output
log4j.properties
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Use OpenJDK 8
FROM openjdk:8-jdk

ENV URL "https:\/\/localhost:8080\/"
ENV TAGS "@cwe-319-auth"
ENV TAGS_SKIP "~@skip"

# Set a sensible server directory.
WORKDIR /home/bdd-security

# Add the directory
ADD . .

# run gradle
RUN ./gradlew buildIt

# Execute gradle tests
CMD sed -E -i "s/<baseUrl>.+<\/baseUrl>/<baseUrl>$URL<\/baseUrl>/" config.xml && ./gradlew -Dcucumber.options="--tags ${TAGS} --tags ${TAGS_SKIP}"
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ task generateReportTask() {
}
}

task buildIt() {
dependsOn assemble, compileTestJava, cleanReports
}

test {
systemProperties = System.properties
dependsOn assemble, compileTestJava, cleanReports
Expand Down

0 comments on commit 0562163

Please sign in to comment.