Repository navigation
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
67 lines (60 loc) · 1.45 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
67 lines (60 loc) · 1.45 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
image: nativecode/node-build:latest
services:
- nativecode/node-build:latest
stages:
- build
- merge
- publish
before_script:
- source .ci-env.sh
- .citools/setup-git ${BUILD_REPO_BRANCH} ${BUILD_REPO_GIT} ${BUILD_REPO_EMAIL}
- .citools/setup-ssh ${BUILD_REPO_DOMAIN} ${BUILD_REPO_SSHKEY_PATH} ${BUILD_REPO_DOMAIN_SSH}
continuous:
stage: build
except:
- develop
- master
- tags
script:
- npm ci
- npm run build || exit 1
- npx semantic-release -d
variables:
GIT_SUBMODULE_STRATEGY: recursive
merge:
stage: merge
only:
- merge_requests
script:
- npm ci
- npm run build || exit 1
variables:
GIT_SUBMODULE_STRATEGY: recursive
prepare:
stage: publish
only:
- develop
- master
script:
- npm ci
- npm run build || exit 1
- npx semantic-release
variables:
GIT_SUBMODULE_STRATEGY: recursive
release:
stage: publish
only:
- tags
script:
- echo -n $DOCKER_TOKEN | docker login -u $DOCKER_USERNAME --password-stdin
- PACKAGE_VERSION=$(git describe --abbrev=0 --tags)
- npm ci
- npm run build || exit 1
- docker build --rm -t nativecode/plexify . || exit 1
- docker tag nativecode/plexify nativecode/plexify:${PACKAGE_VERSION} || exit 1
- docker push nativecode/plexify:${PACKAGE_VERSION} || exit 1
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
DOCKER_TLS_CERTDIR: ""
GIT_SUBMODULE_STRATEGY: recursive