From 6c910e64ca2882787c80b2b583b0e3f8076526ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Tue, 5 Jul 2022 15:51:39 +0200 Subject: [PATCH 1/8] Update CI for fusion merge. GNP-6140 --- .gitlab-ci.yml | 72 ++++++++++++++++++-------------------------------- 1 file changed, 26 insertions(+), 46 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 289ebef9..d7b2eee0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,9 +95,9 @@ test-and-sonarqube: # disable sonarqube because it apparently needs node, but I don't know why, and it can't find it anymore now that # there is no frontend project anymore, and it takes sooooo much time to complete anyway for results that nobody # will ever look - # - find /tmp/node/*/bin -name node -exec ln -s {} /tmp/node/node \; - # - export PATH="/tmp/node/:$PATH" - # - ./gradlew -s sonarqube -x test --parallel + - find /tmp/node/*/bin -name node -exec ln -s {} /tmp/node/node \; + - export PATH="/tmp/node/:$PATH" + - ./gradlew -s sonarqube -x test --parallel artifacts: reports: junit: @@ -133,8 +133,12 @@ build: - "$JAR_PATH" expire_in: 1 week - -.restart-config-server: &restart_config_server +restart-config-server-openstack: + tags: + - openstack + variables: + SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} + SERVER_USER: ${SERVER_USER_OPENSTACK} stage: build script: - eval $(ssh-agent -s) @@ -144,27 +148,13 @@ build: - eval $(ssh-agent -k) allow_failure: true -restart-config-server-proxmox: - variables: - SERVER_IP: ${SERVER_IP_PROXMOX} - SERVER_USER: ${SERVER_USER_PROXMOX} - <<: *restart_config_server - -restart-config-server-openstack: - tags: - - openstack - variables: - SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} - SERVER_USER: ${SERVER_USER_OPENSTACK} - <<: *restart_config_server - - # DEPLOY - .deploy-to-vm: &deploy_to_vm # Hidden job which serves as template for executed jobs below. # See https://docs.gitlab.com/ee/ci/yaml/#anchors + tags: + - openstack retry: 2 script: ## SSH initialization @@ -185,8 +175,6 @@ restart-config-server-openstack: allow_failure: false deploy-to-beta: - tags: - - openstack stage: deploy-beta extends: .deploy-to-vm variables: @@ -194,18 +182,16 @@ deploy-to-beta: SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} APP_PORT: ${BETA_FAIDARE_PORT} ENV: beta - CONTEXT_PATH: faidare-beta + CONTEXT_PATH: faidare except: refs: - master only: refs: - - branches + - merge_requests when: always deploy-to-staging: - tags: - - openstack stage: deploy-staging extends: .deploy-to-vm variables: @@ -213,39 +199,35 @@ deploy-to-staging: SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} APP_PORT: ${STAGING_FAIDARE_PORT} ENV: staging - CONTEXT_PATH: faidare-staging + CONTEXT_PATH: faidare only: refs: - - branches + - merge_requests except: refs: - master when: manual -deploy-to-int: - tags: - - proxmox - stage: deploy-production +deploy-to-staging-private: + stage: deploy-staging extends: .deploy-to-vm variables: - SERVER_USER: ${SERVER_USER_PROXMOX} - SERVER_IP: ${SERVER_IP_PROXMOX} - APP_PORT: ${INT_FAIDARE_PORT} - ENV: int - CONTEXT_PATH: faidare-int + SERVER_USER: ${SERVER_USER_OPENSTACK} + SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} + APP_PORT: ${STAGING_PRIVATE_FAIDARE_PORT} + ENV: prod-private + CONTEXT_PATH: faidare-private only: refs: - master when: manual deploy-to-prod-public: - tags: - - proxmox stage: deploy-production extends: .deploy-to-vm variables: - SERVER_USER: ${SERVER_USER_PROXMOX} - SERVER_IP: ${SERVER_IP_PROXMOX} + SERVER_USER: ${SERVER_USER_OPENSTACK} + SERVER_IP: ${SERVER_IP_OPENSTACK_PROD} APP_PORT: ${PROD_PUBLIC_FAIDARE_PORT} ENV: prod-public CONTEXT_PATH: faidare @@ -255,13 +237,11 @@ deploy-to-prod-public: when: manual deploy-to-prod-private: - tags: - - proxmox stage: deploy-production extends: .deploy-to-vm variables: - SERVER_USER: ${SERVER_USER_PROXMOX} - SERVER_IP: ${SERVER_IP_PROXMOX} + SERVER_USER: ${SERVER_USER_OPENSTACK} + SERVER_IP: ${SERVER_IP_OPENSTACK_PROD} APP_PORT: ${PROD_PRIVATE_FAIDARE_PORT} ENV: prod-private CONTEXT_PATH: faidare-private -- GitLab From f2a5868ce9a8954e83f89098f9d77e749db27452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Tue, 5 Jul 2022 16:26:58 +0200 Subject: [PATCH 2/8] Replace only keywords by rules. GNP-6140 --- .gitlab-ci.yml | 132 +++++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 69 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7b2eee0..54a83f63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,33 +34,31 @@ cache: # PRE-BUILD build-loader-docker-image: - image: registry.forgemia.inra.fr/urgi-is/docker-rare/docker-git:latest - stage: pre-build - services: - - docker:20.10.6-dind - script: - # build the image - - docker build -t registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:${IMAGE_TAG} . - - docker build -t registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:latest . - # Login before pushing the image - - docker login registry.forgemia.inra.fr -u $CONTAINER_REGISTRY_USERNAME -p $CONTAINER_REGISTRY_TOKEN - # push the built image - - docker push registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:${IMAGE_TAG} - # only push latest tag on master branch - - if [ "master" == "${CI_COMMIT_REF_SLUG}" ] ; then docker push registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:latest ; fi; - only: - changes: - - Dockerfile - - scripts/* - - backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/*_mapping.json - - backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json - - .gitlab-ci.yml - allow_failure: true - + image: registry.forgemia.inra.fr/urgi-is/docker-rare/docker-git:latest + stage: pre-build + services: + - docker:20.10.6-dind + script: + # build the image + - docker build -t registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:${IMAGE_TAG} . + - docker build -t registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:latest . + # Login before pushing the image + - docker login registry.forgemia.inra.fr -u $CONTAINER_REGISTRY_USERNAME -p $CONTAINER_REGISTRY_TOKEN + # push the built image + - docker push registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:${IMAGE_TAG} + # only push latest tag on master branch + - if [ "${CI_DEFAULT_BRANCH}" == "${CI_COMMIT_REF_SLUG}" ] ; then docker push registry.forgemia.inra.fr/urgi-is/docker-rare/faidare-loader:latest ; fi; + rules: + - changes: + - Dockerfile + - scripts/* + - backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/*_mapping.json + - backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/settings.json + - .gitlab-ci.yml + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + allow_failure: true # TESTS - - test-and-sonarqube: stage: test tags: @@ -102,21 +100,10 @@ test-and-sonarqube: reports: junit: - ./backend/build/test-results/test/TEST-*.xml - only: - refs: - - merge_requests - - -test-and-sonarqube-master: - extends: test-and-sonarqube - only: - refs: - - master - + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # BUILD - - build: tags: - openstack @@ -132,6 +119,10 @@ build: paths: - "$JAR_PATH" expire_in: 1 week + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH restart-config-server-openstack: tags: @@ -147,9 +138,12 @@ restart-config-server-openstack: - ssh ${SERVER_USER}@${SERVER_IP} "sudo systemctl restart bootapp@config-server" - eval $(ssh-agent -k) allow_failure: true + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # DEPLOY - .deploy-to-vm: &deploy_to_vm # Hidden job which serves as template for executed jobs below. # See https://docs.gitlab.com/ee/ci/yaml/#anchors @@ -162,17 +156,18 @@ restart-config-server-openstack: - ssh-add <(echo "${SSH_PRIVATE_KEY}") - ssh -o StrictHostKeyChecking=no ${SERVER_USER}@${SERVER_IP} 'echo "Successfully connected on $(hostname)"' # Copy jar - - scp ./backend/build/libs/${APP_NAME}.jar ${SERVER_USER}@${SERVER_IP}:/tmp/${APP_NAME}-${ENV}.jar - - ssh ${SERVER_USER}@${SERVER_IP} "sudo mv /tmp/${APP_NAME}-${ENV}.jar /opt/bootapp/${APP_NAME}-${ENV}.jar ; sudo chown -R bootapp:bootapp /opt/bootapp/" + - scp ${JAR_PATH} ${SERVER_USER}@${SERVER_IP}:/tmp/${APP_NAME}-${ENV}.jar + - ssh ${SERVER_USER}@${SERVER_IP} "sudo mv /tmp/${APP_NAME}-${ENV}.jar /opt/bootapp/ ; sudo chown -R bootapp:bootapp /opt/bootapp/" # Restarting service with the updated jar and the according Spring profiles enabled - ssh ${SERVER_USER}@${SERVER_IP} "sudo systemctl restart bootapp@${APP_NAME}-${ENV}" - eval $(ssh-agent -k) - echo "Deploy done. Application should be available at http://${SERVER_IP}:${APP_PORT}/${CONTEXT_PATH}" - only: - changes: + rules: + - changes: - .gitlab-ci.yml - backend/src/**/* allow_failure: false + needs: ["build"] deploy-to-beta: stage: deploy-beta @@ -183,13 +178,11 @@ deploy-to-beta: APP_PORT: ${BETA_FAIDARE_PORT} ENV: beta CONTEXT_PATH: faidare - except: - refs: - - master - only: - refs: - - merge_requests - when: always + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: always deploy-to-staging: stage: deploy-staging @@ -200,13 +193,11 @@ deploy-to-staging: APP_PORT: ${STAGING_FAIDARE_PORT} ENV: staging CONTEXT_PATH: faidare - only: - refs: - - merge_requests - except: - refs: - - master - when: manual + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual deploy-to-staging-private: stage: deploy-staging @@ -217,10 +208,11 @@ deploy-to-staging-private: APP_PORT: ${STAGING_PRIVATE_FAIDARE_PORT} ENV: prod-private CONTEXT_PATH: faidare-private - only: - refs: - - master - when: manual + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual deploy-to-prod-public: stage: deploy-production @@ -231,10 +223,11 @@ deploy-to-prod-public: APP_PORT: ${PROD_PUBLIC_FAIDARE_PORT} ENV: prod-public CONTEXT_PATH: faidare - only: - refs: - - master - when: manual + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual deploy-to-prod-private: stage: deploy-production @@ -245,7 +238,8 @@ deploy-to-prod-private: APP_PORT: ${PROD_PRIVATE_FAIDARE_PORT} ENV: prod-private CONTEXT_PATH: faidare-private - only: - refs: - - master - when: manual + rules: + # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + # when: never + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual -- GitLab From a18661620c50ca08e7a3c8dc19db4f44578e7810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Tue, 5 Jul 2022 16:27:46 +0200 Subject: [PATCH 3/8] Enable SKIP_DEPLOY keyword. GNP-6140. --- .gitlab-ci.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54a83f63..569a6fc6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -120,8 +120,8 @@ build: - "$JAR_PATH" expire_in: 1 week rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH restart-config-server-openstack: @@ -139,8 +139,8 @@ restart-config-server-openstack: - eval $(ssh-agent -k) allow_failure: true rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # DEPLOY @@ -179,8 +179,8 @@ deploy-to-beta: ENV: beta CONTEXT_PATH: faidare rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: always @@ -194,8 +194,8 @@ deploy-to-staging: ENV: staging CONTEXT_PATH: faidare rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: manual @@ -209,8 +209,8 @@ deploy-to-staging-private: ENV: prod-private CONTEXT_PATH: faidare-private rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: manual @@ -224,8 +224,8 @@ deploy-to-prod-public: ENV: prod-public CONTEXT_PATH: faidare rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: manual @@ -239,7 +239,7 @@ deploy-to-prod-private: ENV: prod-private CONTEXT_PATH: faidare-private rules: - # - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i - # when: never + - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i + when: never - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: manual -- GitLab From df59af21191d11139461935bc556fd4b945e68da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Tue, 5 Jul 2022 16:33:41 +0200 Subject: [PATCH 4/8] Allow interrupting jobs. Remove node search. GNP-6140 --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 569a6fc6..6ed90792 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,8 +93,6 @@ test-and-sonarqube: # disable sonarqube because it apparently needs node, but I don't know why, and it can't find it anymore now that # there is no frontend project anymore, and it takes sooooo much time to complete anyway for results that nobody # will ever look - - find /tmp/node/*/bin -name node -exec ln -s {} /tmp/node/node \; - - export PATH="/tmp/node/:$PATH" - ./gradlew -s sonarqube -x test --parallel artifacts: reports: @@ -102,6 +100,7 @@ test-and-sonarqube: - ./backend/build/test-results/test/TEST-*.xml rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + interruptible: true # BUILD build: @@ -123,6 +122,7 @@ build: - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + interruptible: true restart-config-server-openstack: tags: @@ -167,6 +167,7 @@ restart-config-server-openstack: - .gitlab-ci.yml - backend/src/**/* allow_failure: false + interruptible: false needs: ["build"] deploy-to-beta: -- GitLab From 383fbba9ede163e147a7a1bd3bc625466ae5ed6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Tue, 5 Jul 2022 16:41:22 +0200 Subject: [PATCH 5/8] Limit ES memory consumption. GNP-6140. --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ed90792..a575d8bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,6 +82,7 @@ test-and-sonarqube: GRADLE_OPTS: "-Dorg.gradle.daemon=true" SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + ES_JAVA_OPTS: "-Xms2g -Xmx2g" cache: key: "${CI_COMMIT_REF_NAME}" policy: pull-push -- GitLab From 5ec65e69fb34fd495795cf1a95bfb38f60ef29ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Tue, 5 Jul 2022 20:28:06 +0200 Subject: [PATCH 6/8] Fix faidare-cards deployment GNP-6140 --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a575d8bc..164cb2d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,8 @@ image: registry.forgemia.inra.fr/urgi-is/docker-rare/docker-browsers:latest variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" GRADLE_USER_HOME: $CI_PROJECT_DIR/.gradle - APP_NAME: faidare - JAR_PATH: "backend/build/libs/${APP_NAME}.jar" + APP_NAME: faidare-cards + JAR_PATH: "backend/build/libs/faidare.jar" GIT_DEPTH: 0 IMAGE_TAG: $CI_COMMIT_REF_SLUG ELASTIC_VERSION: "7.13.2" @@ -193,7 +193,7 @@ deploy-to-staging: SERVER_USER: ${SERVER_USER_OPENSTACK} SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} APP_PORT: ${STAGING_FAIDARE_PORT} - ENV: staging + ENV: staging-public CONTEXT_PATH: faidare rules: - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i @@ -208,7 +208,7 @@ deploy-to-staging-private: SERVER_USER: ${SERVER_USER_OPENSTACK} SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} APP_PORT: ${STAGING_PRIVATE_FAIDARE_PORT} - ENV: prod-private + ENV: staging-private CONTEXT_PATH: faidare-private rules: - if: $CI_COMMIT_MESSAGE =~ /SKIP_DEPLOY/i -- GitLab From dd740c8a985b8e40c77f60361e5743491eb07417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Wed, 6 Jul 2022 00:01:29 +0200 Subject: [PATCH 7/8] Minor changes. GNP-6140 --- .gitlab-ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 164cb2d5..e4ae0d3f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ image: registry.forgemia.inra.fr/urgi-is/docker-rare/docker-browsers:latest variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" GRADLE_USER_HOME: $CI_PROJECT_DIR/.gradle - APP_NAME: faidare-cards + SERVICE_NAME: faidare-cards JAR_PATH: "backend/build/libs/faidare.jar" GIT_DEPTH: 0 IMAGE_TAG: $CI_COMMIT_REF_SLUG @@ -145,7 +145,7 @@ restart-config-server-openstack: - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # DEPLOY -.deploy-to-vm: &deploy_to_vm +.deploy-to-vm: # Hidden job which serves as template for executed jobs below. # See https://docs.gitlab.com/ee/ci/yaml/#anchors tags: @@ -157,10 +157,8 @@ restart-config-server-openstack: - ssh-add <(echo "${SSH_PRIVATE_KEY}") - ssh -o StrictHostKeyChecking=no ${SERVER_USER}@${SERVER_IP} 'echo "Successfully connected on $(hostname)"' # Copy jar - - scp ${JAR_PATH} ${SERVER_USER}@${SERVER_IP}:/tmp/${APP_NAME}-${ENV}.jar - - ssh ${SERVER_USER}@${SERVER_IP} "sudo mv /tmp/${APP_NAME}-${ENV}.jar /opt/bootapp/ ; sudo chown -R bootapp:bootapp /opt/bootapp/" - # Restarting service with the updated jar and the according Spring profiles enabled - - ssh ${SERVER_USER}@${SERVER_IP} "sudo systemctl restart bootapp@${APP_NAME}-${ENV}" + - scp ${JAR_PATH} ${SERVER_USER}@${SERVER_IP}:/tmp/${SERVICE_NAME}-${ENV}.jar + - ssh ${SERVER_USER}@${SERVER_IP} "sudo mv /tmp/${SERVICE_NAME}-${ENV}.jar /opt/bootapp/ ; sudo chown -R bootapp:bootapp /opt/bootapp/ ; sudo systemctl restart bootapp@${SERVICE_NAME}-${ENV}" - eval $(ssh-agent -k) - echo "Deploy done. Application should be available at http://${SERVER_IP}:${APP_PORT}/${CONTEXT_PATH}" rules: @@ -186,7 +184,7 @@ deploy-to-beta: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: always -deploy-to-staging: +deploy-to-staging-public: stage: deploy-staging extends: .deploy-to-vm variables: -- GitLab From 6f7a81bf9d31b69df3b4099d5a0f4ca494027173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Flores?= <raphael.flores@inrae.fr> Date: Thu, 11 Aug 2022 14:27:57 +0200 Subject: [PATCH 8/8] Fix STAGING_FAIDARE_PORT port. --- .gitlab-ci.yml | 2 +- ABOUT.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4ae0d3f..452d8242 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -190,7 +190,7 @@ deploy-to-staging-public: variables: SERVER_USER: ${SERVER_USER_OPENSTACK} SERVER_IP: ${SERVER_IP_OPENSTACK_DEV} - APP_PORT: ${STAGING_FAIDARE_PORT} + APP_PORT: ${STAGING_PUBLIC_FAIDARE_PORT} ENV: staging-public CONTEXT_PATH: faidare rules: diff --git a/ABOUT.md b/ABOUT.md index a1daa992..3153002b 100644 --- a/ABOUT.md +++ b/ABOUT.md @@ -3,11 +3,11 @@ The purpose of this portal is to facilitate the discoverability of public data on plant biology from a federation of established data repositories. It is based on the [Breeding API (BrAPI)](https://brapi.org/) specifications and facilitates the access to genotype and phenotype datasets for crop and forest plants through an easy to use web interface. -It also provides a standard interface that can be accessed programatically through [web services](https://urgi.versailles.inra.fr/faidare/swagger-ui.html). +It also provides a standard interface that can be accessed programatically through [web services](https://urgi.versailles.inrae.fr/faidare/swagger-ui.html). It is an extension of the generic [Data-Discovery portal](https://forgemia.inra.fr/urgi-is/data-discovery), a web portal that allows finding any type of data across several databases through a lightweight keyword based search. -FAIDARE offers more detailed search and data retrieval capabilities and it takes advantage of the growing adoption of the BrAPI. +FAIDARE offers more detailed search and data retrieval capabilities and it takes advantage of the growing adoption of the BrAPI. -It has been developed by [INRA-URGI](http://urgi.versailles.inra.fr/) in collaboration with [**Elixir Plant**](https://elixir-europe.org/communities/plant-sciences), [**Phenome-Emphasis.fr**](https://www.phenome-emphasis.fr/phenome_eng/Methodological-projects/MCP2-Distributed-Information-system) and [**Elixir-fr/IFB**](https://www.france-bioinformatique.fr). +It has been developed by [INRAE-URGI](http://urgi.versailles.inrae.fr/) in collaboration with [**Elixir Plant**](https://elixir-europe.org/communities/plant-sciences), [**Phenome-Emphasis.fr**](https://www.phenome-emphasis.fr/phenome_eng/Methodological-projects/MCP2-Distributed-Information-system) and [**Elixir-fr/IFB**](https://www.france-bioinformatique.fr). -If you want to join the FAIDARE federation, please read the "Join us" section and [contact us](mailto:urgi-contact@inra.fr?subject=%5BFAIDARE%5D). +If you want to join the FAIDARE federation, please read the "Join us" section and [contact us](mailto:urgi-contact@inrae.fr?subject=%5BFAIDARE%5D). -- GitLab