Skip to content

Commit 313083d

Browse files
brosenfiajoymajumdar
authored andcommitted
Getting the docker-compose example working on Windows MinGW / MSys (Netflix#234)
* Change to accepted line-endings (for windows with autocrlf conversion shut off) * Addressed errors starting example cluster via metacatPorts task (docker-compose) executed via MinGW/MSys * Convert link to file with relative reference (via psql) for docker mounted volume from windows host support.
1 parent 97b756a commit 313083d

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

codequality/checkstyle/checkstyle.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
</module>
1919

2020
<!-- Checks that there is a newline at the end of each file. -->
21-
<module name="NewlineAtEndOfFile"/>
21+
<module name="NewlineAtEndOfFile">
22+
<property name="lineSeparator" value="lf_cr_crlf"/>
23+
</module>
2224

2325
<!-- Implementation of a check that looks for a single line in any file type. -->
2426
<module name="RegexpSingleline">

metacat-functional-tests/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ task expandWar(type: Copy) {
9191
task startMetacatCluster(type: Exec) {
9292
dependsOn 'expandWar'
9393
if (project.ext.startCluster) {
94-
commandLine rootProject.file('scripts/start_metacat_test_cluster.sh'), project.file('metacat-test-cluster/docker-compose.yml')
94+
commandLine 'sh', rootProject.file('scripts/start_metacat_test_cluster.sh'), project.file('metacat-test-cluster/docker-compose.yml')
9595
} else {
9696
commandLine '/bin/echo', 'skipping cluster start'
9797
}
9898
}
9999

100100
task stopMetacatCluster(type: Exec) {
101101
if (project.ext.stopCluster) {
102-
commandLine rootProject.file('scripts/stop_metacat_test_cluster.sh'), project.file('metacat-test-cluster/docker-compose.yml')
102+
commandLine 'sh', rootProject.file('scripts/stop_metacat_test_cluster.sh'), project.file('metacat-test-cluster/docker-compose.yml')
103103
} else {
104104
commandLine '/bin/echo', 'skipping cluster stop'
105105
}
@@ -119,7 +119,7 @@ task metacatPorts {
119119
def get_docker_port = { String label, int exposed_port ->
120120
new ByteArrayOutputStream().withStream { os ->
121121
exec {
122-
commandLine rootProject.file('scripts/print_docker_port.sh'), "label=${label}", exposed_port
122+
commandLine 'sh', rootProject.file('scripts/print_docker_port.sh'), "label=${label}", exposed_port
123123
standardOutput = os
124124
}
125125
return os.toString().trim()

metacat-functional-tests/metacat-test-cluster/datastores/postgres/docker-entrypoint-initdb.d/world.sql

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
\ir world/world.sql

scripts/start_metacat_test_cluster.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ $? -ne 0 ]; then
1414
exit 9
1515
fi
1616

17-
docker-compose --file ${COMPOSE_FILE} exec -T cassandra cqlsh -f /init/init.cql #>> build/docker_compose.log 2>&1
17+
docker-compose --file ${COMPOSE_FILE} exec -T cassandra cqlsh -f //init/init.cql #>> build/docker_compose.log 2>&1
1818
if [ $? -ne 0 ]; then
1919
echo "Unable to initialize Cassandra"
2020
exit 9

0 commit comments

Comments
 (0)