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

22

23 24 25 26 27 28
# Tools

test_tools:
  stage: test_tools
  script: make -C tools/tests

Mathieu Giraud's avatar
Mathieu Giraud committed
29
# Algorithm
30 31 32

test_algo_unit:
  stage: test_unit
33
  script: make -C algo unit
34 35
  only:
    - /^feature-a\/.*$/
36 37 38 39 40 41

test_tools_unit:
  stage: test_unit
  script: make -C tools/tests
  only:
    - /^feature-a\/.*$/
42 43 44

test_algo_should:
  stage: test_functional
45
  script: make -C algo should
46 47 48 49 50
  only:
    - /^feature-a\/.*$/

test_algo_shouldvdj:
  stage: test_shouldvdj
51
  script: make -C algo shouldvdj
52 53 54
  only:
    - /^feature-a\/.*$/

Mathieu Giraud's avatar
Mathieu Giraud committed
55 56
algo_valgrind_unit:
  stage: valgrind_unit
57
  script: make -C algo valgrind_unit
Mathieu Giraud's avatar
Mathieu Giraud committed
58 59
  only:
    - /^feature-a\/.*$/
60 61
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
62 63 64

algo_valgrind_functional:
  stage: valgrind_functional
65
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
66 67 68
  when: manual
  only:
    - /^feature-a\/.*$/
69 70
  tags:
    - valgrind
Mathieu Giraud's avatar
Mathieu Giraud committed
71

72 73 74 75 76 77
prepare_release:
  stage: prepare_release
  script: make -C algo release RELEASE_TAG='rc'
  when: manual
  only:
    - /^feature-a\/.*$/
78

Mathieu Giraud's avatar
Mathieu Giraud committed
79
# Client
80

81
test_browser_unit:
82
  stage: test_unit
83
  script: make unit_browser
84 85 86
  artifacts:
    paths:
    - browser/
87
  only:
88
    - /^feature-[cw]\/.*$/
89
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
90
    - prod-client
91
    - dev
92 93
  tags:
    - web
94

95 96
test_browser-functional:
  stage: test_functional
97 98 99 100
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
101 102 103 104 105 106 107 108
    - HEADLESS=1 make -C browser/test functional
  artifacts:
    paths:
    - browser/
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
109 110
  tags:
    - web
111 112 113

test_browser-functional-external:
  stage: test_functional_external
114
  retry: 2
115 116 117 118 119
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
120 121 122
  artifacts:
    paths:
    - browser/
123
  only:
124
    - /^feature-[cw]\/.*$/
125
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
126
    - prod-client
127 128
  tags:
    - web
129

130 131
code_quality:
  stage: test_quality
132
  script: make -C browser quality
133 134 135 136
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
137
    - dev
138 139
  tags:
    - web
140

141 142
deploy_review:
  stage: deploy_review
143
  script:
144
    - make -C browser icons
145
    - rsync -av --delete browser $DEPLOY_SERVER:$DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG
146
  environment:
147
    name: review/$CI_BUILD_REF_NAME
Mikaël Salson's avatar
Mikaël Salson committed
148
    url: http://$CI_BUILD_REF_SLUG.ci.vidjil.org/?data=analysis-example.vidjil
Mathieu Giraud's avatar
Mathieu Giraud committed
149
    on_stop: stop_deploy_review
150
  only:
151
    - /^feature-[cw]\/.*$/
152
    - /^hotfix-[cw]\/.*$/
153 154
  tags:
    - web
155

156
deploy_prod:
157
  stage: deploy_prod
158
  script:
159
    - rsync -av --delete browser $PROD_CLIENT_SERVER:$PROD_CLIENT_PATH
160
    - ssh $PROD_CLIENT_SERVER "cp -pr $PROD_CLIENT_PATH_TEMPLATE/browser $PROD_CLIENT_PATH"
161 162
  environment:
    name: production
163
    url: http://app.vidjil.org/?data=analysis-example.vidjil
164 165
  only:
    - prod-client
166 167
  tags:
    - web
168

169 170
stop_deploy_review:
  stage: deploy_review
171 172 173 174 175 176
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
177
    name: review/$CI_BUILD_REF_NAME
178
    action: stop
179
  only:
180
    - /^feature-[cw]\/.*$/
181
    - /^hotfix-[cw]\/.*$/
182 183
  tags:
    - web