.gitlab-ci.yml 3.26 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
  tags: web
89

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

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

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

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

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

159 160
stop_deploy_review:
  stage: deploy_review
161 162 163 164 165 166
  variables:
    GIT_STRATEGY: none
  script:
    - ssh $DEPLOY_SERVER "rm -rf $DEPLOY_SERVER_PATH$CI_BUILD_REF_SLUG"
  when: manual
  environment:
167
    name: review/$CI_BUILD_REF_NAME
168
    action: stop
169
  only:
170
    - /^feature-[cw]\/.*$/
171
    - /^hotfix-[cw]\/.*$/
172
  tags: web