Skip to content

Commit 4b05310

Browse files
committed
Subdivided e2e recipe with more steps
1 parent 855322c commit 4b05310

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,8 @@ jobs:
10581058
${{ runner.os }}-node-
10591059
- name: setup images
10601060
run: ./ci/github/system-testing/e2e.bash setup_images
1061+
- name: setup and start swarm
1062+
run: ./ci/github/system-testing/e2e.bash setup_and_run_stack
10611063
- name: setup environment
10621064
run: ./ci/github/system-testing/e2e.bash setup_environment
10631065
- name: setup registry
@@ -1070,7 +1072,7 @@ jobs:
10701072
- name: recover docker logs
10711073
id: logs_recovery
10721074
if: always()
1073-
run: ./ci/github/system-testing/e2e.bash recover_artifacts
1075+
run: ./ci/github/system-testing/e2e.bash dump_docker_logs
10741076
- name: upload docker logs
10751077
if: always()
10761078
uses: actions/upload-artifact@v2

ci/github/system-testing/e2e.bash

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,17 @@ uninstall_insecure_registry() {
7474
}
7575

7676
setup_images() {
77-
echo "--------------- getting simcore docker images..."
77+
echo "--------------- preparing docker images..."
7878
make pull-version || ( (make pull-cache || true) && make build-x tag-version)
7979
make info-images
8080

81+
}
82+
83+
setup_and_run_stack() {
8184
# configure simcore for testing with a private registry
8285
install_insecure_registry
8386

87+
echo "--------------- starting swarm ..."
8488
# start simcore and set log-level
8589
export LOG_LEVEL=WARNING
8690
make up-version
@@ -135,29 +139,32 @@ setup_database() {
135139
install() {
136140
## shortcut
137141
setup_images
142+
setup_and_run_stack
138143
setup_environment
139144
setup_registry
140145
setup_database
141146
}
142147

143148
test() {
149+
sleep 5
144150
pushd tests/e2e
145151
make test
146152
popd
147-
148153
}
149154

150-
recover_artifacts() {
155+
dump_docker_logs() {
151156
# all screenshots are in tests/e2e/screenshots if any
152157

153158
# get docker logs.
154159
# NOTE: dumping logs sometimes hangs. Introducing a timeout
155-
mkdir simcore_logs
160+
mkdir --parents simcore_logs
156161
(timeout 30 docker service logs --timestamps --tail=300 --details ${SWARM_STACK_NAME}_webserver >simcore_logs/webserver.log 2>&1) || true
157162
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_director >simcore_logs/director.log 2>&1) || true
158163
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_storage >simcore_logs/storage.log 2>&1) || true
159164
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_sidecar >simcore_logs/sidecar.log 2>&1) || true
160165
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_catalog >simcore_logs/catalog.log 2>&1) || true
166+
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_migration >simcore_logs/migration.log 2>&1) || true
167+
(timeout 30 docker service logs --timestamps --tail=200 --details ${SWARM_STACK_NAME}_postgres >simcore_logs/postgres.log 2>&1) || true
161168
}
162169

163170
clean_up() {

tests/e2e/Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ registry-down: ## bring the docker registry down
4141
wait-for-services: ## wait for simcore services to be up
4242
@python utils/wait_for_services.py
4343

44+
4445
.PHONY: transfer-images-to-registry
4546
transfer-images-to-registry: ## transfer images to registry
47+
# pushing sleeper image
4648
@docker pull itisfoundation/sleeper:1.0.0
4749
@docker tag itisfoundation/sleeper:1.0.0 registry:5000/simcore/services/comp/itis/sleeper:1.0.0
4850
@docker push registry:5000/simcore/services/comp/itis/sleeper:1.0.0
49-
50-
# @docker pull itisfoundation/jupyter-base-notebook:2.13.0
51-
# @docker tag itisfoundation/jupyter-base-notebook:2.13.0 registry:5000/simcore/services/dynamic/jupyter-base-notebook:2.13.0
52-
# @docker push registry:5000/simcore/services/dynamic/jupyter-base-notebook:2.13.0
5351
# completed transfer of images
5452
curl -s registry:5000/v2/_catalog | jq '.repositories'
53+
curl -s http://registry:5000/v2/simcore/services/comp/itis/sleeper/tags/list?n=50 | jq '.'
54+
5555

5656
PUBLISHED_PORT = $(shell docker inspect $(shell docker service ls --format "{{ .Name }}" | grep postgres) --format "{{(index .Endpoint.Ports 0).PublishedPort}}")
5757
.PHONY: inject-templates-in-db
@@ -64,8 +64,9 @@ inject-templates-in-db: ## inject project templates
6464
--dbname simcoredb \
6565
--command "\copy projects from 'tutorials/sleepers_project_template_sql.csv' csv header;";
6666

67+
6768
.PHONY: test
68-
test: ## test the platform
69+
test: ## test the platformå
6970
# tests
7071
npm test
7172
# tests whether tutorial run

0 commit comments

Comments
 (0)