-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
132 lines (121 loc) · 3.08 KB
/
.gitlab-ci.yml
File metadata and controls
132 lines (121 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
image: node:14
stages:
- test
# - build
# - deploy
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
run-unit-test:
stage: test
variables:
CYPRESS_INSTALL_BINARY: 0
cache:
paths:
- node_modules/
- .npm
script:
- npm install npm@latest -g
- npm install
- npm rebuild canvas --update-binary
- npm run test:unit:ci
artifacts:
when: always
paths:
- coverage
reports:
junit:
- junit.xml
run-integration-test:
image: cypress/browsers
stage: test
only:
- merge_requests
variables:
npm_config_cache: "$CI_PROJECT_DIR/.npm"
CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress"
cache:
paths:
- node_modules/
- .npm
- cache/Cypress
script:
- npm install npm@latest -g
- npm ci
- npm run test:integration:ci
artifacts:
when: always
reports:
junit:
- junit-integration*.xml
# build_site:
# stage: build
# script:
# - cd site/
# - npm install
# - npm run export
# - mkdir ../public/ || true
# - cp -a __sapper__/export/* ../public/
# artifacts:
# paths:
# - public
# cache:
# paths:
# - site/node_modules/
# only:
# - master
# push_keycdn:
# stage: deploy
# variables:
# KEYCDN_USER: "atepoorthuis"
# KEYCDN_ZONE_NAME: "florence"
# script:
# - apt-get update && apt-get install rsync brotli -y
# - eval $(ssh-agent -s)
# - echo "$SSH_DEPLOY_KEY" | tr -d '\r' | ssh-add -
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# - echo 'rsync.keycdn.com,185.172.149.122 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFM7Jqs3BqC+MSEoVsZ+YMKTjVIMTSKlZX2+0t88o4LZvd+BWt71SkXv4mQr7xKD59m7jeJcWiO43u7YQzi+Tgg=' >> ~/.ssh/known_hosts
# - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
# # - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec brotli -f -k {} \;
# - rsync -rtvz --chmod=D2755,F644 --delete public/ ${KEYCDN_USER}@rsync.keycdn.com:${KEYCDN_ZONE_NAME}/
# only:
# - master
.renovate:
variables:
RENOVATE_GIT_AUTHOR: "${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>"
RENOVATE_DRY_RUN: "false"
RENOVATE_LOG_LEVEL: "info"
image:
name: renovate/renovate
entrypoint: [""]
script:
- >
node /usr/src/app/dist/renovate.js
--platform "gitlab"
--endpoint "${CI_API_V4_URL}"
--git-author "${RENOVATE_GIT_AUTHOR}"
--dry-run "${RENOVATE_DRY_RUN}"
"${CI_PROJECT_PATH}"
only:
- master
- schedules
Renovate:
extends: .renovate
# the below doesn't work with absolute links so disable for now
# pages:preview:
# stage: deploy
# only:
# - merge_requests
# script:
# - cd site/
# - npm install
# - npm run export
# artifacts:
# paths:
# - site/__sapper__/export
# cache:
# paths:
# - site/node_modules/
# environment:
# name: preview/${CI_COMMIT_REF_NAME}
# url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/site/__sapper__/export/index.html