kfaraz commented on code in PR #18302:
URL: https://github.com/apache/druid/pull/18302#discussion_r2236837699


##########
.github/workflows/docker-tests.yml:
##########
@@ -0,0 +1,97 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "Docker Tests using Distribution Image"
+on:
+  workflow_call:
+
+jobs:
+  run-docker-tests:
+    name: Run Docker tests
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: Retrieve Docker container
+        id: docker-restore
+        uses: actions/cache/restore@v4
+        with:
+          key: druid-dist-container.tar.gz-${{ github.sha }}
+          path: |
+            ./druid-dist-container.tar.gz
+      - name: Stop and remove Druid Docker containers
+        run: |
+          echo "Force stopping all Druid containers and pruning"
+          docker ps -aq --filter "ancestor=apache/druid" | xargs -r docker rm 
-f
+          docker system prune -af --volumes
+      - name: Load Docker image
+        run: |
+          docker load --input druid-dist-container.tar.gz
+          docker images
+      - name: Setup Java
+        uses: actions/setup-java@v4
+        with:
+          distribution: 'zulu'
+          java-version: 17
+          cache: 'maven'
+      - name: Run *DockerTest*
+        id: run-it
+        run: |
+          source .github/scripts/distribution_checks_env.sh
+          .github/scripts/run_unit-tests -Dtest=*DockerTest* 
-Ddruid.testing.docker.image=$DRUID_DIST_IMAGE_NAME

Review Comment:
   > instead of trying to reuse the run_unit-tests script; you could possibly 
make a separate one for this; and run that (you could still invode 
run_unit-tests from there if you want)
   
   Could you please elaborate? What would be the advantage of putting this in a 
separate script if we would still invoke `run_unit-tests` from there?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to