-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
81 lines (73 loc) · 1.75 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
78
79
80
81
image: registry.gitlab.com/nebtex/golang:master
# This is NOT a job and will be ignored by GitLab-CI
.shared_hidden_key: &shared # This is an anchor
before_script:
- mkdir -p /go/src /go/bin /go/src/github.com/nebtex
- export GOPATH=/go
- export PATH=$PATH:/go/bin
- ln -s /builds/nebtex/menshend /go/src/github.com/nebtex/menshend
- cd /go/src/github.com/nebtex/menshend
- echo $PWD
services:
- vault:latest
variables:
VAULT_DEV_ROOT_TOKEN_ID: "myroot"
VAULT_DEV_LISTEN_ADDRESS: "0.0.0.0:8200"
SKIP_SETCAP: "yes"
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- vendor/
untracked: true
stages:
- deps
- test
- build
- deploy
- publish
deps:
<<: *shared
stage: deps
script:
- glide install
#test:
# stage: test
# script:
# - make test
build_master:
<<: *shared
stage: build
only:
- master
script:
- export MENSHEND_RELEASE=latest
- bash scripts/bundle_react.sh
- make build
build_tags:
<<: *shared
stage: build
only:
- tags
script:
- export prefix=v
- export MENSHEND_RELEASE=${CI_COMMIT_TAG#$prefix}
- bash scripts/bundle_react.sh
- make build
publish docs:
image: cr.genos.nebtex.com/publicdev/gitbook:v2.3.0
only:
- master
stage: publish
script:
- mkdir -p $HOME/.ssh
- ssh-keyscan github.com >> ~/.ssh/known_hosts
- git config --global user.name "nebot"
- git config --global user.email [email protected]
- git config --global user.signingkey $nebot_secret_key_gpg
- git config --global commit.gpgsign true
- echo -e "$nebot_key" > $HOME/.ssh/id_rsa
- echo -e "$nebot_gpg" > $HOME/private.key
- gpg --import $HOME/private.key
- chmod 400 $HOME/.ssh/id_rsa
- cp -rf README.md docs/README.md
- make docs