.gitlab-ci.yml 3.1 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
  - deploy_review
13
  - test_functional
14
  - test_functional_external
15
  - test_shouldvdj
16
  - prepare_release
Mathieu Giraud's avatar
Mathieu Giraud committed
17 18
  - valgrind_unit
  - valgrind_functional
19
  - deploy_prod
20

21

Mathieu Giraud's avatar
Mathieu Giraud committed
22
# Algorithm
23 24 25

test_algo_unit:
  stage: test_unit
26
  script: make -C algo unit
27 28
  only:
    - /^feature-a\/.*$/
29 30 31 32 33 34

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
    - /^feature-a\/.*$/
35 36 37

test_algo_should:
  stage: test_functional
38
  script: make -C algo should
39 40 41 42 43
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
44
  script: make -C algo shouldvdj
45 46 47
  only:
    - /^feature-a\/.*$/

Mathieu Giraud's avatar
Mathieu Giraud committed
48 49
algo_valgrind_unit:
  stage: valgrind_unit
50
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
51 52 53 54 55
  only:
    - /^feature-a\/.*$/

algo_valgrind_functional:
  stage: valgrind_functional
56
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
57 58 59 60
  when: manual
  only:
    - /^feature-a\/.*$/

61 62 63 64 65 66
prepare_release:
  stage: prepare_release
  script: make -C algo release RELEASE_TAG='rc'
  when: manual
  only:
    - /^feature-a\/.*$/
67

Mathieu Giraud's avatar
Mathieu Giraud committed
68
# Client
69

70
test_browser_unit:
71
  stage: test_unit
72
  script: make unit_browser
73 74 75
  artifacts:
    paths:
    - browser/
76
  only:
77
    - /^feature-[cw]\/.*$/
78
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
79
    - prod-client
80
    - dev
81

82 83
test_browser-functional:
  stage: test_functional
84 85 86 87
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
88 89 90 91 92 93 94 95 96 97 98
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client

test_browser-functional-external:
  stage: test_functional_external
99
  retry: 2
100 101 102 103 104
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
105 106 107
  artifacts:
    paths:
    - browser/
108
  only:
109
    - /^feature-[cw]\/.*$/
110
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
111
    - prod-client
112

113 114
code_quality:
  stage: test_quality
115
  script: make -C browser quality
116 117 118 119
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
120
    - dev
121

122 123
deploy_review:
  stage: deploy_review
124
  script:
125
    - make -C browser icons
126
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
127
  environment:
128
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
129
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
130
    on_stop: stop_deploy_review
131
  only:
132
    - /^feature-[cw]\/.*$/
133
    - /^hotfix-[cw]\/.*$/
134

135
deploy_prod:
136
  stage: deploy_prod
137
  script:
138
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
139
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
140 141
  environment:
    name: production
142
    url: http://app.vidjil.org/?data=analysis-example.vidjil
143 144 145
  only:
    - prod-client
    
146 147
stop_deploy_review:
  stage: deploy_review
148 149 150 151 152 153
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
154
    name: review/$CI_BUILD_REF_NAME
155
    action: stop
156
  only:
157
    - /^feature-[cw]\/.*$/
158
    - /^hotfix-[cw]\/.*$/