.gitlab-ci.yml 3.18 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
Mathieu Giraud's avatar
Mathieu Giraud committed
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 90
test_browser-functional:
  stage: test_functional
91 92 93 94
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
95 96 97 98 99 100 101 102 103 104 105
    - 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
106
  retry: 2
107 108 109 110 111
  script:
    - make -C browser
    - source /etc/profile.d/rvm.sh
    - rvm use 2.1.1
    - HEADLESS=1 make -C browser/test external
112 113 114
  artifacts:
    paths:
    - browser/
115
  only:
116
    - /^feature-[cw]\/.*$/
117
    - /^hotfix-[cw]\/.*$/
Mathieu Giraud's avatar
Mathieu Giraud committed
118
    - prod-client
119

120 121
code_quality:
  stage: test_quality
122
  script: make -C browser quality
123 124 125 126
  only:
    - /^feature-[cw]\/.*$/
    - /^hotfix-[cw]\/.*$/
    - prod-client
127
    - dev
128

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

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