Skip to content
Snippets Groups Projects
Commit fc01c07f authored by Pietro Braghieri's avatar Pietro Braghieri Committed by Alberto Debiasi
Browse files

Update .gitlab-ci.yml

parent a20b2ec3
No related branches found
No related tags found
No related merge requests found
...@@ -12,13 +12,17 @@ variables: ...@@ -12,13 +12,17 @@ variables:
# when running from the command line. # when running from the command line.
# `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins. # `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -Dmaven.repo.local=/tmp/.m2/repository" MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -Dmaven.repo.local=/tmp/.m2/repository"
#-Dmaven.repo.local=$HOME/.m2/repository
UPDATE_SITE_MOUNT_DIR: "/tmp/www_us"
UPDATE_SITE_PROD_TARGET_DIR: "html/tools/aida_est"
UPDATE_SITE_DEVEL_TARGET_DIR: "${UPDATE_SITE_PROD_TARGET_DIR}_devel"
REPOSITORY_TO_COPY: "org.polarsys.chess.parent/releng/eu.fbk.tools.aida.chess.repository/target/repository"
stages: stages:
- build_sde - build_sde
- build_est - build_est
- test - test
#- deploy - deploy
#- documentation #- documentation
#- release #- release
...@@ -40,7 +44,7 @@ est_build_test_job: ...@@ -40,7 +44,7 @@ est_build_test_job:
script: script:
- "curl -X POST -F token=951497a03a4073902aa28ab8d9c2d3 -F ref=master https://gitlab.fbk.eu/api/v4/projects/1159/trigger/pipeline" - "curl -X POST -F token=951497a03a4073902aa28ab8d9c2d3 -F ref=master https://gitlab.fbk.eu/api/v4/projects/1159/trigger/pipeline"
build_test_job: maven_build_and_test:
only: only:
- master - master
...@@ -48,3 +52,45 @@ build_test_job: ...@@ -48,3 +52,45 @@ build_test_job:
environment: staging environment: staging
script: script:
- "export DISPLAY=:0.0; cd org.polarsys.chess.parent; mvn $MAVEN_CLI_OPTS -P Neon-Java8,DevelopmentUpdateSite clean install" - "export DISPLAY=:0.0; cd org.polarsys.chess.parent; mvn $MAVEN_CLI_OPTS -P Neon-Java8,DevelopmentUpdateSite clean install"
deploy_to_development_update_site:
dependencies:
- maven_build_and_test
variables:
GIT_STRATEGY: none
stage: deploy
environment: staging
script:
- echo "Deploy to development update site"
- mkdir -p $UPDATE_SITE_MOUNT_DIR
- sshfs -o nonempty -o umask=0777 es@es-static.fbk.eu:/ $UPDATE_SITE_MOUNT_DIR
- mkdir -p $UPDATE_SITE_MOUNT_DIR/$UPDATE_SITE_DEVEL_TARGET_DIR
- cp -r ${REPOSITORY_TO_COPY}/* $UPDATE_SITE_MOUNT_DIR/$UPDATE_SITE_DEVEL_TARGET_DIR
- chmod -R 0777 $UPDATE_SITE_MOUNT_DIR/$UPDATE_SITE_DEVEL_TARGET_DIR
- fusermount -uz $UPDATE_SITE_MOUNT_DIR
when: manual
# allow_failure: false
only:
- master
deploy_to_production_update_site:
dependencies:
- maven_build_and_test
variables:
GIT_STRATEGY: none
stage: deploy
environment: staging
script:
- echo "Deploy to production update site"
- mkdir -p $UPDATE_SITE_MOUNT_DIR
- sshfs -o nonempty -o umask=0777 es@es-static.fbk.eu:/ $UPDATE_SITE_MOUNT_DIR
- mkdir -p $UPDATE_SITE_MOUNT_DIR/$UPDATE_SITE_PROD_TARGET_DIR
- cp -r ${REPOSITORY_TO_COPY}/* $UPDATE_SITE_MOUNT_DIR/$UPDATE_SITE_PROD_TARGET_DIR
- chmod -R 0777 $UPDATE_SITE_MOUNT_DIR/$UPDATE_SITE_PROD_TARGET_DIR
- fusermount -uz $UPDATE_SITE_MOUNT_DIR
when: manual
# allow_failure: false
only:
- master
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment