Skip to content

Commit

Permalink
chore: run immudb in docker
Browse files Browse the repository at this point in the history
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
  • Loading branch information
jeroiraz committed Nov 29, 2022
1 parent 861738b commit 080e8e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/gradle.yml
Expand Up @@ -20,6 +20,8 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Start immudb container
run: docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -p 3322:3322 codenotary/immudb:1.4.0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
32 changes: 2 additions & 30 deletions build.gradle
Expand Up @@ -120,32 +120,6 @@ dependencies {
implementation 'javax.annotation:javax.annotation-api:1.2-b01'
}

task immudbStart {
// INFO: You can disable this logic (comment these lines below within this task)
// if you want to use an existing immudb server, without starting and stopping
// the locally used immudb version (stored in `immudb` directory and controlled
// through the scripts). Just make sure immudb server has the proper version.
ProcessBuilder pb = new ProcessBuilder()
pb.command("/bin/bash", "immudb/clean.sh")
Process procClean = pb.start()
procClean.waitFor()

pb = new ProcessBuilder()
pb.command("/bin/bash", "immudb/start.sh")
Process proc = pb.start()
proc.waitFor(15, TimeUnit.SECONDS)
}

task immudbStop(type: Exec) {
// INFO: You can disable this logic (comment these lines below within this task)
// if you want to use an existing immudb server, without starting and stopping
// the locally used immudb version (stored in `immudb` directory and controlled
// through the scripts). Just make sure immudb server has the proper version.
workingDir 'immudb'
commandLine './clean.sh'
}


idea {
module {
sourceDirs += file("${projectDir}/src/generated/main/java")
Expand All @@ -166,9 +140,7 @@ test {
}
}

test.dependsOn immudbStart

test.finalizedBy([jacocoTestReport, immudbStop])
test.finalizedBy([jacocoTestReport])

task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
Expand Down Expand Up @@ -259,4 +231,4 @@ publishing {
signing {
sign publishing.publications.gpr
}
}
}

0 comments on commit 080e8e9

Please sign in to comment.