Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: .gitlab-ci.yml

Issue 29904564: Issue 6682 - Automated builds (Closed)
Patch Set: Created Oct. 8, 2018, 2:46 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dependencies » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This file is part of Adblock Plus <https://adblockplus.org/>, 1 # This file is part of Adblock Plus <https://adblockplus.org/>,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 # 12 #
13 # You should have received a copy of the GNU General Public License 13 # You should have received a copy of the GNU General Public License
14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
15 # 15 #
16 # NOTE: 16 # NOTE:
17 # This CI configuration is meant to be run on private runners, which can be 17 # This CI configuration is meant to be run on private runners, which can be
18 # provisioned with the Ansible roles from 18 # provisioned with the Ansible roles from
19 # https://gitlab.com/eyeo/devops/ansible-role-adblockplus-builder and 19 # https://gitlab.com/eyeo/devops/ansible-role-adblockplus-builder and
20 # https://gitlab.com/eyeo/devops/ansible-role-gitlab-runner 20 # https://gitlab.com/eyeo/devops/ansible-role-gitlab-runner
21 21
22 stages: 22 stages:
23 - prepare 23 - prepare
24 - test 24 - test
25 - build
25 26
26 .dependencies: 27 .dependencies:
27 script: &dependencies 28 script: &dependencies
28 - mkdir -p .git/info 29 - mkdir -p .git/info
29 - pip install --user Jinja2 cryptography 30 - pip install --user Jinja2 cryptography
30 - python ensure_dependencies.py 31 - python ensure_dependencies.py
31 - "[ -d node_modules ] || npm install" 32 - "[ -d node_modules ] || npm install"
32 33
33 .test_template: 34 .pull_cache:
34 stage: test
35 before_script: *dependencies
36 cache: 35 cache:
37 key: cache_$CI_COMMIT_SHA 36 key: cache_$CI_COMMIT_SHA
38 paths: 37 paths:
39 - ./ 38 - ./
40 policy: pull 39 policy: pull
41 40
41 .test_template:
42 extends: .pull_cache
43 stage: test
44 before_script: *dependencies
45
46 .build:
47 extends: .pull_cache
48 before_script: *dependencies
49 stage: build
50 only:
51 - master
52 script:
53 - python build.py build -t $PLATFORM
54 artifacts:
55 paths:
56 - ./*.xpi
57 - ./*.zip
58 - ./*.appx
Sebastian Noack 2018/10/08 15:16:55 Perhaps we should make the filename a little more
tlucas 2018/10/08 15:39:13 IMHO ideally, we would again read the "basename" a
42 59
43 prepare-dependencies: 60 prepare-dependencies:
44 stage: prepare 61 stage: prepare
45 script: *dependencies 62 script: *dependencies
46 cache: 63 cache:
47 key: cache_$CI_COMMIT_SHA 64 key: cache_$CI_COMMIT_SHA
48 paths: 65 paths:
49 - ./ 66 - ./
50 policy: push 67 policy: push
51 68
52 tests:gecko: 69 tests:gecko:
53 extends: .test_template 70 extends: .test_template
54 script: 71 script:
55 - npm run test-only -- -g gecko 72 - npm run test-only -- -g gecko
56 73
57 tests:chrome: 74 tests:chrome:
58 extends: .test_template 75 extends: .test_template
59 script: 76 script:
60 - xvfb-run npm run test-only -- -g chrome 77 - xvfb-run npm run test-only -- -g chrome
61 78
62 lint: 79 lint:
63 extends: .test_template 80 extends: .test_template
64 script: 81 script:
65 - npm run lint 82 - npm run lint
83
84 build:chrome:
85 extends: .build
86 variables:
87 PLATFORM: chrome
88
89 build:gecko:
90 extends: .build
91 variables:
92 PLATFORM: gecko
93
94 build:edge:
95 extends: .build
96 variables:
97 PLATFORM: edge
98 allow_failure: true
Sebastian Noack 2018/10/08 15:16:55 Can we add a comment referring to the issue here?
tlucas 2018/10/08 15:39:13 Done.
OLDNEW
« no previous file with comments | « no previous file | dependencies » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld