@@ -112,6 +112,61 @@ jobs:
112112 - name : Set up Docker Buildx
113113 uses : docker/setup-buildx-action@v2
114114
115+ - name : Build Hive Image locally
116+ uses : docker/build-push-action@v4
117+ with :
118+ context : ./packaging/src/docker/
119+ file : ./packaging/src/docker/Dockerfile
120+ push : false
121+ load : true
122+ tags : hive:test
123+ build-args :
124+ |
125+ HIVE_VERSION=${{ env.HIVE_VERSION }}
126+ HADOOP_VERSION=${{ env.HADOOP_VERSION }}
127+ TEZ_VERSION=${{ env.TEZ_VERSION }}
128+ BUILD_ENV=${{ env.BUILD_ENV }}
129+
130+ - name : Build Standalone Metastore Image locally
131+ uses : docker/build-push-action@v4
132+ with :
133+ context : ./standalone-metastore/packaging/src/docker/
134+ file : ./standalone-metastore/packaging/src/docker/Dockerfile
135+ push : false
136+ load : true
137+ tags : hive:standalone-metastore-test
138+ build-args :
139+ |
140+ HIVE_VERSION=${{ env.HIVE_VERSION }}
141+ HADOOP_VERSION=${{ env.HADOOP_VERSION }}
142+ BUILD_ENV=${{ env.BUILD_ENV }}
143+
144+ - name : Create k8s cluster
145+ uses : helm/kind-action@v1
146+
147+ - name : Set up Helm
148+ uses : azure/setup-helm@v4
149+
150+ - name : Load images
151+ run : kind load docker-image hive:test hive:standalone-metastore-test --name chart-testing
152+
153+ - name : Deploy Hive
154+ run : |
155+ ./itests/test-docker/scripts/setup.sh
156+
157+ - name : Run JUnit
158+ run : |
159+ mvn --batch-mode test -Pitests -pl itests/test-docker
160+
161+ - name : Test HiveServer2
162+ run : |
163+ ./itests/test-docker/scripts/test_hive_server2.sh
164+
165+ - name : Clean up k8s
166+ run : |
167+ ./itests/test-docker/scripts/teardown.sh
168+ kind delete cluster --name chart-testing
169+
115170 - name : Build and push Hive Image to docker hub
116171 uses : docker/build-push-action@v4
117172 with :
@@ -141,8 +196,16 @@ jobs:
141196 HADOOP_VERSION=${{ env.HADOOP_VERSION }}
142197 BUILD_ENV=${{ env.BUILD_ENV }}
143198
144- - name : Dump disk usage on failure
145- if : failure()
199+ - name : Dump resource space at the end
200+ run : |
201+ df -h
202+ free -h
203+
204+ - name : Dump resource usage on failure
205+ if : failure() || cancelled()
146206 run : |
147207 df -h
148208 du -xh / --max-depth=3 2>/dev/null | sort -h | tail -50
209+ free -h
210+ ps aux --sort -rss | head -n 30
211+ kubectl get pods
0 commit comments