This repository has been archived by the owner on Oct 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
77 lines (70 loc) · 1.92 KB
/
.gitlab-ci.yml
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
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
#services:
# - mysql:latest
# - redis:latest
# - postgres:latest
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
stages:
- build
- test
- deploy
services:
- docker:dind
.build_template: &build_template
stage: build
image: node:8
cache:
paths:
- node_modules/
script:
- npm install
- npm run build
artifacts:
paths:
- dist/archives
expire_in: 2 week
tags:
- docker
build:
<<: *build_template
except:
- tags
build_release:
<<: *build_template
image: registry.gitlab.com/softwulf/sentry-agent/node:latest
only:
- tags
variables:
SENTRY_RELEASE: VideoSyncer@$CI_COMMIT_TAG
SENTRY_PROJECT: videosyncer
SENTRY_ENV: production
script:
- npm install
- npm run build -- --env.prod --env.version=$CI_COMMIT_TAG
- sh /sentry_scripts/deploy.sh
- sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps dist/base
- sentry-cli releases finalize $SENTRY_RELEASE
deploy:
stage: deploy
only:
- tags
image: registry.gitlab.com/softwulf/webext-deploy:latest
dependencies:
- build_release
variables:
WEB_EXT_APP_NAME: VideoSyncer
WEB_EXT_ARTIFACT_DIR: /builds/Softwulf/VideoSyncer/dist/archives
WEB_EXT_CHROME_APP_ID: ofpeaemcoefdpfkimgghkkggcimkjepk
WEB_EXT_AMO_APP_ID: "{560ece31-4892-44b1-b1cc-331bad846f57}"
WEB_EXT_SOURCE_DIR: /builds/Softwulf/VideoSyncer
WEB_EXT_APP_VERSION: $CI_COMMIT_TAG
script:
- pwd
- ls $(pwd)
- npm start --prefix /webext-deploy