Skip to content

Commit

Permalink
[SHIBUI-922]
Browse files Browse the repository at this point in the history
tie into gradle build
  • Loading branch information
jj committed Nov 27, 2018
1 parent 34ea82a commit cec8e0b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id 'net.researchgate.release' version '2.6.0'
id 'io.franzbecker.gradle-lombok' version '1.13'
id 'com.palantir.docker' version '0.20.1'
id 'com.palantir.docker-run' version '0.20.1'
}

apply plugin: 'io.spring.dependency-management'
Expand Down Expand Up @@ -179,6 +180,8 @@ sourceSets {
}

task integrationTest(type: Test) {
dependsOn 'dockerRun', 'runChecker'
finalizedBy 'dockerStop'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
systemProperties = ['webdriver.gecko.driver': 'C:\\Users\\jj-unicon\\Downloads\\geckodriver-v0.21.0-win64\\geckodriver.exe']
Expand Down Expand Up @@ -275,4 +278,26 @@ docker {
files tasks.bootJar.outputs
files 'src/main/docker-files/loader.properties'
buildArgs(['JAR_FILE': "shibui-${version}.jar"])
}

tasks.dockerRun.dependsOn tasks.docker
dockerRun {
name 'shibuiint'
image 'unicon/shibui'
ports '8080:8080'
daemonize true
command '--spring.profiles.include=no-auth'
clean true
}

task runChecker << {
def ready = false
while (!ready) {
try {
ready = 'http://localhost:8080'.toURL().text.length() > 0
} catch (IOException e) {
println 'cannot reach site'
sleep 5000
}
}
}

0 comments on commit cec8e0b

Please sign in to comment.