-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (61 loc) · 1.2 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
variables:
GIT_SSL_NO_VERIFY: "true"
image: starefossen/ruby-node:2-6
before_script:
- ruby -v
- node -v
- npm -v
- gem install bundler
- bin/setup
cache:
paths:
- vendor/bundle
- node_modules
stages:
- build
- test
- deploy
build:
stage: build
script:
- grunt build
artifacts:
paths:
- keepachangelog-*.gem
style:
script:
- "grunt test:style"
spec:
script:
- "grunt test:spec"
integration:
script:
- "grunt test:integration"
fileshare:
stage: deploy
environment: production
script:
- |
if [[ "$SSH_KEY" == "" || "$SSH_USER" == "" || "$TARGET_HOST" == "" || "$TARGET_PATH" == "" ]]; then
echo "Skipping deploy due to missing credentials"
exit 0
fi
- grunt publish
only:
- tags
rubygems.org:
stage: deploy
environment: production
script:
- |
if [[ "$RUBYGEMS_API_KEY" == "" ]]; then
echo "Skipping deploy due to missing credentials"
exit 0
fi
- mkdir -p ~/.gem
- "echo \":rubygems_api_key: $RUBYGEMS_API_KEY\" > ~/.gem/credentials"
- chmod 0600 /root/.gem/credentials
- gem build keepachangelog.gemspec
- gem push keepachangelog-*.gem
only:
- tags