-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathJenkinsfile-Folio-Update
77 lines (62 loc) · 1.91 KB
/
Jenkinsfile-Folio-Update
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
pipeline {
agent any
triggers {
cron('H(5-20) 5 * * *')
}
stages {
stage('harvest -prod') {
environment {
OKAPI_URL = credentials('OKAPI_PROD_URL')
}
steps {
checkout scm
sshagent (['sul-devops-team']){
sh '''#!/bin/bash -l
export PATH=/ci/home/bin:$PATH
export HUB_CONFIG=/ci/home/config/hub
# Load RVM
rvm use 3.4.1@searchworks --create
gem install bundler
bundle install --without production
# Harvest -prod
SETTINGS__FOLIO__CONFIG_SET=prod bin/rake folio:update_types_cache || exit 1
# Make a PR
git checkout -B folio-policies-update-prod
git add config/folio
git commit -m "Update FOLIO types" &&
git push [email protected]:sul-dlss/SearchWorks.git folio-policies-update-prod &&
hub pull-request -f -m "Update FOLIO types" --base main
echo 'Done!'
'''
}
}
}
stage('harvest -test') {
environment {
OKAPI_URL = credentials('OKAPI_TEST_URL')
}
steps {
checkout scm
sshagent (['sul-devops-team']){
sh '''#!/bin/bash -l
export PATH=/ci/home/bin:$PATH
export HUB_CONFIG=/ci/home/config/hub
# Load RVM
rvm use 3.4.1@searchworks --create
gem install bundler
bundle install --without production
# Harvest -test
SETTINGS__FOLIO__CONFIG_SET=test bin/rake folio:update_types_cache || exit 1
# Make a PR
git checkout -B folio-policies-update-test
git add config/folio
git commit -m "Update FOLIO types" &&
git push [email protected]:sul-dlss/SearchWorks.git folio-policies-update-test &&
hub pull-request -f -m "Update FOLIO types" --base main
echo 'Done!'
'''
}
}
}
}
}