-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
73 lines (73 loc) · 2.13 KB
/
Jenkinsfile
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
pipeline
{
agent none
stages
{
stage('Reek Static Code Analysis')
{
agent
{
kubernetes
{
yamlFile 'pod-image-validate.yaml'
}
}
steps
{
container('safehaven')
{
sh 'reek lib || true'
}
}
}
stage('Cucumber Aruba Tests')
{
agent
{
kubernetes
{
yamlFile 'pod-image-validate.yaml'
}
}
steps
{
container('safehaven')
{
checkout scm
sh 'rake install'
sh 'export SAFE_TTY_TOKEN=$(safe token) ; cucumber lib'
}
}
}
stage('Release to RubyGems.org')
{
agent
{
kubernetes
{
yamlFile 'pod-image-release.yaml'
}
}
when { not { environment name: 'GIT_BRANCH', value: 'origin/master' } }
steps
{
container('safehaven')
{
checkout scm
sh 'mkdir -p $HOME/.gem && cp $HOME/gemcredentials/credentials $HOME/.gem/credentials'
sh 'chmod 0600 $HOME/.gem/credentials'
/*
sh 'mkdir -p $HOME/.ssh && cp $HOME/gitsshconfig/config $HOME/.ssh/config'
sh 'git config --global user.email [email protected]'
sh 'git config --global user.name "Apollo Akora"'
sh 'ssh -i $HOME/gitsshkey/safedb.code.private.key.pem -vT [email protected] || true'
sh 'git remote set-url --push origin [email protected]:devops4me/safedb.net.git'
sh 'git branch && git checkout master'
sh 'gem bump minor --release --file=$PWD/lib/version.rb'
*/
sh 'rake release'
}
}
}
}
}