-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
103 lines (98 loc) · 1.88 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
103 lines (98 loc) · 1.88 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
stages:
- test
- bundle
- publish
- mirror
npm_run_ci:
stage: test
image: node:8
services:
- name: mariadb:10
alias: db
script:
- test -d .npm && mv .npm ${HOME}
- npm install
- npm run ci
- mv ${HOME}/.npm .
variables:
NODE_ENV: "test"
MYSQL_HOST: "db"
MYSQL_PORT: "3306"
MYSQL_ROOT_PASSWORD: adminpw
cache:
key: ${CI_PROJECT_ID}
paths:
- .npm
tags:
- docker
except:
- tags
- /^gh-pages/
npm_pack:
stage: bundle
image:
name: node:10-alpine
entrypoint: ["/bin/su", "node", "-c"]
script:
- npm pack
cache:
key: "${CI_PROJECT_ID}"
paths:
- .npm
artifacts:
name: npm-pack
paths:
- '*.tgz'
tags:
- docker
npm_publish:
stage: publish
image:
name: node:10-alpine
entrypoint: ["/bin/su", "node", "-c"]
script: |
test "${NPM_TOKEN}" == "" && echo "no npm token found" && false
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm publish *.tgz --access public
dependencies:
- npm_pack
cache:
key: "${CI_PROJECT_ID}"
paths:
- .npm
except:
- branches
only:
- /^release\/.*/
tags:
- docker
gh_pages:
stage: publish
image:
name: squidfunk/mkdocs-material:2.7.2
entrypoint: [ "/bin/sh", "-c" ]
only:
- /^master/
script: |
git remote set-url origin https://${GITLAB_USER}:${GITLAB_TOKEN}@git.sc.uni-leipzig.de/ubl/bdd_dev/webmasterei/autoconfig.git
mkdocs gh-deploy
tags:
- docker
github_mirror:
stage: mirror
image:
name: alpine/git
entrypoint: [ "/bin/sh", "-c" ]
variables:
GIT_STRATEGY: clone
GIT_CHECKOUT: "false"
script: |
cd /tmp
git clone --mirror ${CI_REPOSITORY_URL} project
cd project
git remote add github https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/ubleipzig/autoconfig.git
git push --mirror github
tags:
- docker
except:
- branches