Skip to content

Commit 3bc3521

Browse files
committed
updates for createing artifact, tests are a little more reliable
1 parent 37c70ac commit 3bc3521

File tree

8 files changed

+31
-26
lines changed

8 files changed

+31
-26
lines changed

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
talpha:
2+
container_name: kvdn_talpha
23
image: kvdn
34
expose:
45
- "9090"
56
dns:
67
- 172.17.0.1
78
tbeta:
9+
container_name: kvdn_tbeta
810
image: kvdn
911
expose:
1012
- "9090"
1113
dns:
1214
- 172.17.0.1
1315
tgamma:
16+
container_name: kvdn_tgamma
1417
image: kvdn
1518
expose:
1619
- "9090"
1720
dns:
1821
- 172.17.0.1
1922
test:
23+
container_name: kvdn_test
2024
image: kvdn
2125
expose:
2226
- "9090"

kvdn.bats

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33

44

5-
@test "build kvdn" {
6-
cd project/; ./gradlew clean; ./gradlew shadowJar
7-
result=$?
8-
[ "$result" -eq 0 ]
9-
}
5+
#@test "build kvdn" {
6+
# cd project/; ./gradlew clean; ./gradlew shadowJar
7+
# result=$?
8+
# [ "$result" -eq 0 ]
9+
#}
1010

1111
@test "build kvdn docker image" {
1212
docker build -t kvdn .
@@ -22,21 +22,21 @@
2222

2323
@test "are they still running after 10 seconds?" {
2424
sleep 10 #should verify we can talk to them here
25-
result=$(docker ps | grep -i kvdn_t | wc -l)
25+
result=$(docker ps | grep -i _t | wc -l)
2626
[ "$result" -ge 3 ]
2727
}
2828
@test "insert a value" {
29-
result=$(docker exec -t -i kvdn_test_1 /bin/bash -c "cd /opt/Client/cli; cp alpha.sh config.sh; echo hello | bash clip.sh -s=test/str/firstkey")
29+
result=$(docker exec -t -i kvdn_test /bin/bash -c "cd /opt/Client/cli; cp alpha.sh config.sh; echo hello | bash clip.sh -s=test/str/firstkey")
3030
[ $(echo "$result" | grep -c str:firstkey ) -eq 1 ]
3131
}
3232
@test "get keys" {
33-
result=$(docker exec -t -i kvdn_test_1 /bin/bash -c "cd /opt/Client/cli; cp beta.sh config.sh; bash clip.sh -k=test/str/")
33+
result=$(docker exec -t -i kvdn_test /bin/bash -c "cd /opt/Client/cli; cp beta.sh config.sh; bash clip.sh -k=test/str/")
3434
echo $result >> /tmp/res
3535
[ $(echo "$result" | grep -c firstkey ) -eq 1 ]
3636
}
3737

3838
@test "get the value" {
39-
result=$(docker exec -t -i kvdn_test_1 /bin/bash -c "cd /opt/Client/cli; cp gamma.sh config.sh; bash clip.sh -g=test/str/firstkey")
39+
result=$(docker exec -t -i kvdn_test /bin/bash -c "cd /opt/Client/cli; cp gamma.sh config.sh; bash clip.sh -g=test/str/firstkey")
4040
[ $(echo "$result" | grep -c hello ) -eq 1 ]
4141
}
4242

project/Client/cli/alpha.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
JQPath=$(which jq)
33
PROTO=http
4-
KVDN_HOST=kvdn_talpha_1.kvdn.docker
4+
KVDN_HOST=kvdn_talpha.kvdn.docker
55
KVDN_PORT=9090

project/Client/cli/beta.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
JQPath=$(which jq)
33
PROTO=http
4-
KVDN_HOST=kvdn_tbeta_1.kvdn.docker
4+
KVDN_HOST=kvdn_tbeta.kvdn.docker
55
KVDN_PORT=9090

project/Client/cli/gamma.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
JQPath=$(which jq)
33
PROTO=http
4-
KVDN_HOST=kvdn_tgamma_1.kvdn.docker
4+
KVDN_HOST=kvdn_tgamma.kvdn.docker
55
KVDN_PORT=9090

project/build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ buildscript {
88
apply plugin: 'java'
99
apply plugin: 'groovy'
1010
apply plugin: 'com.github.johnrengelman.shadow'
11+
apply plugin: 'maven'
12+
apply plugin: 'maven-publish'
13+
1114

1215
group = 'net.iowntheinter'
1316
version = '0.1'
1417

18+
uploadArchives {
19+
repositories {
20+
mavenDeployer {
21+
repository(url: "file://localhost/tmp/repo/")
22+
}
23+
}
24+
}
1525
if (!JavaVersion.current().java8Compatible) {
1626
throw new IllegalStateException('''A Haiku:
1727
| This needs Java 8,
@@ -40,7 +50,11 @@ dependencies {
4050
compile 'com.esotericsoftware:kryo:3.0.3'
4151

4252
}
43-
53+
model {
54+
tasks.generatePomFileForMavenCustomPublication {
55+
destination = file("$buildDir/generated-pom.xml")
56+
}
57+
}
4458
shadowJar {
4559
classifier = 'fat'
4660
manifest {

project/build/resources/main/kvdn-start.groovy

Lines changed: 0 additions & 9 deletions
This file was deleted.

project/build/tmp/shadowJar/MANIFEST.MF

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)