From 9d6a5d7700a45f3305c5d4870d1c55ab15893d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 21 Jul 2022 16:56:20 +0200 Subject: [PATCH 1/4] Change temporarily push branch to this one as well in 'publish.yml' --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ff149b6bc..93b960dfe 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - # - 5065-automatic-deployment-to-stage.ocelot.social-on-push-to-master-branch # for testing while developing + - 5093-fix-automatic-deployment # for testing while developing jobs: ############################################################################## From 861de8edcbee23ec451997b17b8aa7101236ced2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 21 Jul 2022 17:15:58 +0200 Subject: [PATCH 2/4] Add sleep for 4 minutes (240s) in 'publish.yml' --- .github/workflows/publish.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 93b960dfe..1228f738a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -300,12 +300,18 @@ jobs: kubectl -n default rollout restart deployment/ocelot-maintenance kubectl -n default set image deployment/ocelot-neo4j container-ocelot-neo4j=ocelotsocialnetwork/neo4j-community:$BUILD_VERSION kubectl -n default rollout restart deployment/ocelot-neo4j + # because this step 'kubectl -n default rollout status deployment/* --timeout=600s' does not work as expected + # and we need the pods to be up again for cleaning and seeding the Neo4j database and the backend. + # !!! this is not a perfect solution !!! + - name: Sleep for 4 minutes, means 240 seconds + run: sleep 240s + shell: bash - name: Verify deployment and wait for the pods of each deplyment to get ready for cleaning and seeding of the database run: | kubectl -n default rollout status deployment/ocelot-backend --timeout=600s kubectl -n default rollout status deployment/ocelot-neo4j --timeout=600s - # kubectl -n default rollout status deployment/ocelot-maintenance --timeout=600s - # kubectl -n default rollout status deployment/ocelot-webapp --timeout=600s + kubectl -n default rollout status deployment/ocelot-maintenance --timeout=600s + kubectl -n default rollout status deployment/ocelot-webapp --timeout=600s - name: Reset and seed Neo4j database via backend for staging # db cleaning and seeding is only possible in production if env 'PRODUCTION_DB_CLEAN_ALLOW=true' is set in deployment run: | From 6bc4663d24eeb5ca929400150ec853900238107f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 21 Jul 2022 17:46:20 +0200 Subject: [PATCH 3/4] Add a comment that deployment need to come up again regulerly 3m 10s 'publish.yml' --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1228f738a..e628f0d9c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -303,6 +303,7 @@ jobs: # because this step 'kubectl -n default rollout status deployment/* --timeout=600s' does not work as expected # and we need the pods to be up again for cleaning and seeding the Neo4j database and the backend. # !!! this is not a perfect solution !!! + # deployments are regularely up again after 3 minutes and 10 seconds - name: Sleep for 4 minutes, means 240 seconds run: sleep 240s shell: bash From e93b7bdcf3a092b22857165112e3766e29ef04fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 21 Jul 2022 17:46:51 +0200 Subject: [PATCH 4/4] Remove temporarily push branch to this one as well in 'publish.yml' --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e628f0d9c..ac333604e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - 5093-fix-automatic-deployment # for testing while developing + # - 5093-fix-automatic-deployment # for testing while developing jobs: ##############################################################################