.gitlab-ci.yml 3.3 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 60 61 62
  only:
    - /^feature-a\/.*$/

algo_valgrind_functional:
  stage: valgrind_functional
63
  script: make -C algo valgrind_should
Mathieu Giraud's avatar
Mathieu Giraud committed
64 65 66 67
  when: manual
  only:
    - /^feature-a\/.*$/

68 69 70 71 72 73
prepare_release:
  stage: prepare_release
  script: make -C algo release RELEASE_TAG='rc'
  when: manual
  only:
    - /^feature-a\/.*$/
74

Mathieu Giraud's avatar
Mathieu Giraud committed
75
# Client
76

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

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

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

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

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

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

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