.gitlab-ci.yml 2.03 KB
Newer Older
1 2 3 4 5


before_script:
  - make data
  - make germline
6
  - make -C browser sha1
7
  - cp -p doc/analysis-example.vidjil browser/
8 9

stages:
10
  - test_quality
11
  - test_unit
12
  - test_functional
13
  - test_shouldvdj
14
  - deploy
15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37


test_algo_unit:
  stage: test_unit
  script: make unit
  only:
    - /^feature-a\/.*$/

test_algo_should:
  stage: test_functional
  script: make should
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
  script: make shouldvdj
  only:
    - /^feature-a\/.*$/



38
test_browser_unit:
39
  stage: test_unit
40
  script: make unit_browser
41 42 43
  artifacts:
    paths:
    - browser/
44
  only:
45
    - /^feature-[cw]\/.*$/
46
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
47
    - prod-client
48

49 50
test_browser-functional:
  stage: test_functional
51 52 53 54 55
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - make headless_browser
56 57 58
  artifacts:
    paths:
    - browser/
59
  only:
60
    - /^feature-[cw]\/.*$/
61
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
62
    - prod-client
63

64 65
code_quality:
  stage: test_quality
66
  script: make -C browser quality
67 68 69 70 71
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client

72 73 74
deploy:
  stage: deploy
  script:
75
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
76
  environment:
77
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
78
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
79
    on_stop: stop_deploy
80
  only:
81
    - /^feature-[cw]\/.*$/
82
    - /^hotfix-[cw]\/.*$/
83

84
deploy_prod:
85 86
  stage: deploy
  script:
87
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
88
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
89 90
  environment:
    name: production
91
    url: http://app.vidjil.org/?data=analysis-example.vidjil
92 93 94
  only:
    - prod-client
    
95 96 97 98 99 100 101 102
stop_deploy:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
103
    name: review/$CI_BUILD_REF_NAME
104
    action: stop
105
  only:
106
    - /^feature-[cw]\/.*$/
107
    - /^hotfix-[cw]\/.*$/