Skip to content

Commit 9346ac7

Browse files
committed
debug docker images
1 parent b78bdd6 commit 9346ac7

File tree

1 file changed

+71
-68
lines changed

1 file changed

+71
-68
lines changed

.github/workflows/geonode-tests.yml

Lines changed: 71 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -18,75 +18,78 @@ jobs:
1818
run: |
1919
docker compose --env-file .env_test -f docker-compose-test.yml build --progress plain
2020
21-
- name: Save built Docker images
22-
run: |
23-
mkdir -p docker_images
24-
docker save -o docker_images/django.tar geonode/geonode:latest-ubuntu-24.04
25-
docker save -o docker_images/geoserver.tar geonode/geoserver:2.24.4-latest
26-
docker save -o docker_images/db.tar geonode/postgis:15-3.5-latest || true
27-
28-
- name: Upload Docker images as artifact
29-
uses: actions/upload-artifact@v4
30-
with:
31-
name: docker-images
32-
path: docker_images
33-
retention-days: 1 # automatically expires after 1 day
34-
35-
geonode_test_suite_smoke:
36-
name: Test tests location
37-
needs: build_images
38-
runs-on: ubuntu-24.04
39-
40-
steps:
41-
- name: Checkout repository
42-
uses: actions/checkout@v4
21+
- name: List built images
22+
run: docker images ls
4323

44-
- name: Download built Docker images
45-
uses: actions/download-artifact@v4
46-
with:
47-
name: docker-images
48-
path: docker_images
49-
50-
- name: Load Docker images
51-
run: |
52-
docker load -i docker_images/django.tar
53-
docker load -i docker_images/geoserver.tar
54-
docker load -i docker_images/db.tar || true
55-
docker load -i docker_images/celery.tar || true
56-
57-
- name: Start the stack
58-
run: docker compose --env-file .env_test -f docker-compose-test.yml up -d
59-
working-directory: ${{ github.workspace }}
60-
61-
- name: Wait for services to become healthy
62-
run: |
63-
n=1
64-
m=10
65-
until [ $n -gt $m ]
66-
do
67-
sleep 60
68-
DJANGO_STATUS=$(docker inspect --format='{{.State.Health.Status}}' django4geonode)
69-
GEOSERVER_STATUS=$(docker inspect --format='{{.State.Health.Status}}' geoserver4geonode)
70-
echo "⏳ Waited $n min (of $m)"
71-
if [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]; then
72-
break
73-
fi
74-
docker ps
75-
n=$((n+1))
76-
done
77-
[[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]
78-
working-directory: ${{ github.workspace }}
79-
80-
- name: Run smoke tests
81-
run: |
82-
docker compose --env-file .env_test -f docker-compose-test.yml exec django bash -lc \
83-
"pwd && ls -all /usr/src/geonode"
84-
working-directory: ${{ github.workspace }}
85-
86-
- name: Stop stack (always)
87-
if: always()
88-
run: docker compose --env-file .env_test -f docker-compose-test.yml down -v
89-
working-directory: ${{ github.workspace }}
24+
# - name: Save built Docker images
25+
# run: |
26+
# mkdir -p docker_images
27+
# docker save -o docker_images/django.tar geonode/geonode:latest-ubuntu-24.04
28+
# docker save -o docker_images/geoserver.tar geonode/geoserver:2.24.4-latest
29+
# docker save -o docker_images/db.tar geonode/postgis:15-3.5-latest || true
30+
#
31+
# - name: Upload Docker images as artifact
32+
# uses: actions/upload-artifact@v4
33+
# with:
34+
# name: docker-images
35+
# path: docker_images
36+
# retention-days: 1 # automatically expires after 1 day
37+
#
38+
# geonode_test_suite_smoke:
39+
# name: Test tests location
40+
# needs: build_images
41+
# runs-on: ubuntu-24.04
42+
#
43+
# steps:
44+
# - name: Checkout repository
45+
# uses: actions/checkout@v4
46+
#
47+
# - name: Download built Docker images
48+
# uses: actions/download-artifact@v4
49+
# with:
50+
# name: docker-images
51+
# path: docker_images
52+
#
53+
# - name: Load Docker images
54+
# run: |
55+
# docker load -i docker_images/django.tar
56+
# docker load -i docker_images/geoserver.tar
57+
# docker load -i docker_images/db.tar || true
58+
# docker load -i docker_images/celery.tar || true
59+
#
60+
# - name: Start the stack
61+
# run: docker compose --env-file .env_test -f docker-compose-test.yml up -d
62+
# working-directory: ${{ github.workspace }}
63+
#
64+
# - name: Wait for services to become healthy
65+
# run: |
66+
# n=1
67+
# m=10
68+
# until [ $n -gt $m ]
69+
# do
70+
# sleep 60
71+
# DJANGO_STATUS=$(docker inspect --format='{{.State.Health.Status}}' django4geonode)
72+
# GEOSERVER_STATUS=$(docker inspect --format='{{.State.Health.Status}}' geoserver4geonode)
73+
# echo "⏳ Waited $n min (of $m)"
74+
# if [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]; then
75+
# break
76+
# fi
77+
# docker ps
78+
# n=$((n+1))
79+
# done
80+
# [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]
81+
# working-directory: ${{ github.workspace }}
82+
#
83+
# - name: Run smoke tests
84+
# run: |
85+
# docker compose --env-file .env_test -f docker-compose-test.yml exec django bash -lc \
86+
# "pwd && ls -all /usr/src/geonode"
87+
# working-directory: ${{ github.workspace }}
88+
#
89+
# - name: Stop stack (always)
90+
# if: always()
91+
# run: docker compose --env-file .env_test -f docker-compose-test.yml down -v
92+
# working-directory: ${{ github.workspace }}
9093

9194
# # -------------------------------------------------
9295
# # SMOKE TESTS (BLOCKING)

0 commit comments

Comments
 (0)