From 5890ef594e785ae9f8c2b4a5d32efca4605b6444 Mon Sep 17 00:00:00 2001 From: "a. abdelwahed" <a.abdelwahed@accenture.com> Date: Mon, 25 Mar 2024 16:30:04 +0100 Subject: [PATCH 1/5] auto deploy to dev --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4826ae6..d632da8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ stages: - prep - test - publish + - deploy - finish cache: @@ -180,6 +181,17 @@ push_images: - docker push $CI_REGISTRY/sphn-semantic-framework/sphn-schemaforge/sphn-schemaforge-sphn-fuseki:$CI_COMMIT_SHORT_SHA - docker-compose -f docker-compose-dev.yaml -f docker-compose.yaml down --volumes --rmi all +deploy_dev: + stage: deploy + script: + - sudo docker compose -f docker-compose.yaml down + - sudo docker system prune -a + - sudo docker compose -f docker-compose.yaml up -d + environment: + name: dev + url: https://fl-5-120.unil.cloud.switch.ch + only: + - main teardown: # useless when deployed in runner environment stage: finish -- GitLab From c969c07ab3e2ca2157b47751115d077ff22db802 Mon Sep 17 00:00:00 2001 From: "a. abdelwahed" <a.abdelwahed@accenture.com> Date: Mon, 25 Mar 2024 16:36:25 +0100 Subject: [PATCH 2/5] removed sudo command --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d632da8..460a4b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -184,9 +184,9 @@ push_images: deploy_dev: stage: deploy script: - - sudo docker compose -f docker-compose.yaml down - - sudo docker system prune -a - - sudo docker compose -f docker-compose.yaml up -d + - docker compose -f docker-compose.yaml down + - docker system prune -a + - docker compose -f docker-compose.yaml up -d environment: name: dev url: https://fl-5-120.unil.cloud.switch.ch -- GitLab From 5f9daf90b67e81497a3044fd56c8a3dc6b9151f0 Mon Sep 17 00:00:00 2001 From: Abdelhamid Abdelwahed <a.abdelwahed@accenture.com> Date: Wed, 27 Mar 2024 14:31:18 +0100 Subject: [PATCH 3/5] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 460a4b1..c4030d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,6 +53,7 @@ pull_labels: stage: prep script: - unzip -h + - echo $TERMINOLOGYSERVER_LABELSGRAPHURI - chmod +x download_whole_prefix.sh - ./download_whole_prefix.sh labelsgraph current/ labels - unzip -o labels/current/external-terminologies-labels.zip -d ./cached-data/ -- GitLab From 98ed9c6a2f85bd00f8fca99d078483101a4b675a Mon Sep 17 00:00:00 2001 From: "a. abdelwahed" <a.abdelwahed@accenture.com> Date: Wed, 3 Apr 2024 09:21:39 +0200 Subject: [PATCH 4/5] updated deployment stage --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4030d0..f9bbba9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -186,7 +186,7 @@ deploy_dev: stage: deploy script: - docker compose -f docker-compose.yaml down - - docker system prune -a + - docker system prune -af - docker compose -f docker-compose.yaml up -d environment: name: dev -- GitLab From 0974a524d946c374289787686026b837a4a02e2b Mon Sep 17 00:00:00 2001 From: "a. abdelwahed" <a.abdelwahed@accenture.com> Date: Wed, 3 Apr 2024 16:41:28 +0200 Subject: [PATCH 5/5] removed teardown stage --- .gitlab-ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9bbba9..4b99463 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,6 @@ stages: - test - publish - deploy - - finish cache: key: ${CI_PIPELINE_ID} @@ -192,10 +191,4 @@ deploy_dev: name: dev url: https://fl-5-120.unil.cloud.switch.ch only: - - main - -teardown: # useless when deployed in runner environment - stage: finish - script: - - docker-compose -f docker-compose-dev.yaml -f docker-compose.yaml down --volumes --rmi all - when: always + - main \ No newline at end of file -- GitLab