-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
116 lines (92 loc) · 2.6 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
pipeline {
agent any
triggers {
cron('H 2 * * 1')
}
environment {
SIDEKIQ_PRO_SECRET = credentials("sidekiq_pro_secret")
ACCESS_TEAM_SLACK_API_TOKEN = credentials("access-team-slack-token")
GH_ACCESS_TOKEN = credentials("sul-ci org token")
}
stages {
stage('Access') {
when {
allOf {
branch 'main';
not { triggeredBy 'SCMTrigger' }
}
}
steps {
checkout scm
sshagent (['sul-devops-team']){
sh '''#!/bin/bash -l
source /opt/rh/devtoolset-6/enable
export PATH=/ci/home/bin:$PATH
export HUB_CONFIG=/ci/home/config/hub
export REPOS_PATH=$WORKSPACE/access
# Load RVM
rvm use 3.2.2@access_dependency_updates --create
gem install bundler
bundle install
bundle config --global gems.contribsys.com $SIDEKIQ_PRO_SECRET
./autupdate.sh
bundle exec ./git_hub_links.rb
'''
}
}
}
stage('Infrastructure') {
when {
allOf {
branch 'main';
not { triggeredBy 'SCMTrigger' }
}
}
steps {
checkout scm
sshagent (['sul-devops-team']){
sh '''#!/bin/bash -l
export PATH=/ci/home/bin:$PATH
export HUB_CONFIG=/ci/home/config/hub
export SLACK_DEFAULT_CHANNEL='#dlss-infrastructure'
export REPOS_PATH=$WORKSPACE/infrastructure
# Load RVM
rvm use 3.3.1@infrastructure_dependency_updates --create
gem install bundler
bundle install --without production staging
bundle config --global gems.contribsys.com $SIDEKIQ_PRO_SECRET
./autupdate.sh
bundle exec ./git_hub_links.rb
'''
}
}
}
stage('Libsys') {
when {
allOf {
branch 'main';
not { triggeredBy 'SCMTrigger' }
}
}
steps {
checkout scm
sshagent (['sul-devops-team']){
sh '''#!/bin/bash -l
source /opt/rh/devtoolset-6/enable
export PATH=/ci/home/bin:$PATH
export HUB_CONFIG=/ci/home/config/hub
export SLACK_DEFAULT_CHANNEL='#libsys'
export REPOS_PATH=$WORKSPACE/libsys
# Load RVM
rvm use 3.1.2@libsys_dependency_updates --create
gem install bundler
bundle install --without production staging
bundle config --global gems.contribsys.com $SIDEKIQ_PRO_SECRET
./autupdate.sh
bundle exec ./git_hub_links.rb
'''
}
}
}
}
}