File tree Expand file tree Collapse file tree 9 files changed +83
-37
lines changed Expand file tree Collapse file tree 9 files changed +83
-37
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ permissions :
10
+ contents : read
11
+
12
+ jobs :
13
+ build :
14
+
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+ - name : Set up JDK 11
20
+ uses : actions/setup-java@v3
21
+ with :
22
+ java-version : ' 11'
23
+ distribution : ' temurin'
24
+ - name : Build
25
+ run : make build
26
+ - name : Create K8s Kind Cluster
27
+
28
+ with :
29
+ cluster_name : ' kind'
30
+ - name : Load Docker Images
31
+ run : |
32
+ kind load docker-image hoptimator
33
+ kind load docker-image hoptimator-flink-runner
34
+ - name : Deploy Dev Environment
35
+ run : make deploy-dev-environment
36
+ - name : Deploy Hoptimator
37
+ run : make deploy deploy-samples
38
+ - name : Wait for Readiness
39
+ run : kubectl wait pod hoptimator --for condition=Ready --timeout=5m || kubectl describe pod hoptimator
40
+ - name : Integration Tests
41
+ run : make integration-tests
42
+
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ COPY ./hoptimator-cli/run.sh ./hoptimator
4
4
COPY ./hoptimator-operator/run.sh ./hoptimator-operator
5
5
COPY ./hoptimator-cli/build/libs/hoptimator-cli-all.jar ./hoptimator-cli-all.jar
6
6
COPY ./hoptimator-operator/build/libs/hoptimator-operator-all.jar ./hoptimator-operator-all.jar
7
+ COPY ./etc/* ./
7
8
COPY ./test-model.yaml ./test-model.yaml
8
9
ENTRYPOINT ["/bin/sh" , "-c" ]
9
10
CMD ["./hoptimator" ]
Original file line number Diff line number Diff line change 6
6
docker build . -t hoptimator
7
7
docker build hoptimator-flink-runner -t hoptimator-flink-runner
8
8
9
+ bounce : build undeploy deploy deploy-samples
10
+
11
+ integration-tests :
12
+ ./bin/hoptimator --run=./integration-tests.sql
13
+ echo " \nPASS"
14
+
9
15
clean :
10
16
./gradlew clean
11
17
@@ -23,4 +29,10 @@ deploy-dev-environment:
23
29
deploy :
24
30
kubectl apply -f ./deploy/
25
31
26
- .PHONY : build clean quickstart deploy-dev-environment deploy
32
+ undeploy :
33
+ kubectl delete -f ./deploy || echo " skipping"
34
+
35
+ deploy-samples :
36
+ kubectl apply -f ./deploy/samples
37
+
38
+ .PHONY : build clean quickstart deploy-dev-environment deploy deploy-samples integration-tests
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
docker build . -t hoptimator
4
- kubectl exec -it hoptimator -c hoptimator -- ./hoptimator
4
+ kubectl exec -it hoptimator -c hoptimator -- ./hoptimator -n " " -p " " -u " jdbc:calcite:model=./test-model.yaml " " $@ "
5
5
Original file line number Diff line number Diff line change 8
8
image : docker.io/library/hoptimator
9
9
imagePullPolicy : Never
10
10
command : ["sleep", "infinity"]
11
+ readinessProbe :
12
+ exec :
13
+ command : ["./hoptimator", "--run=./readiness-probe.sql"]
14
+ timeoutSeconds : 30
15
+
Original file line number Diff line number Diff line change
1
+
2
+ !connect " jdbc:calcite:model=./test-model.yaml" " " " "
3
+
4
+ !set maxWidth 80
5
+ !table
6
+ !schemas
7
+
8
+ SELECT * FROM DATAGEN .PERSON ;
9
+ SELECT * FROM DATAGEN .COMPANY ;
10
+
Original file line number Diff line number Diff line change
1
+
2
+ !connect " jdbc:calcite:model=./test-model.yaml" " " " "
3
+
4
+ !set maxWidth 80
5
+ !table
6
+ !schemas
7
+
8
+ SELECT * FROM DATAGEN .PERSON ;
9
+ SELECT * FROM DATAGEN .COMPANY ;
10
+
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ if [[ -f "$JAR" ]]; then
6
6
java \
7
7
--add-opens java.base/java.lang=ALL-UNNAMED \
8
8
--add-opens java.base/java.util=ALL-UNNAMED \
9
- -jar $JAR --verbose=true -n " " -p " " -u " jdbc:calcite:model=./test-model.yaml "
9
+ -jar $JAR --verbose=true " $@ "
10
10
else
11
11
echo " jar file not found; maybe forgot to build?"
12
12
fi
You can’t perform that action at this time.
0 commit comments