Skip to content

Commit a2533a4

Browse files
committed
Add jks files
1 parent 22cd19b commit a2533a4

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Archive Jenkins settings and plugins
66

77
* `$JENKINS_HOME/*.xml`
8+
* `$JENKINS_HOME/*.jks`
89
* `$JENKINS_HOME/jobs/*/*.xml`
910
* `$JENKINS_HOME/nodes/*`
1011
* `$JENKINS_HOME/plugins/*.jpi`

jenkins-backup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ function main() {
6464

6565
cp "${JENKINS_HOME}/"*.xml "${ARC_DIR}"
6666

67+
jks_count=$(find ${JENKINS_HOME} -maxdepth 1 -type f -name *.jks | wc -l)
68+
if [ ${jks_count} -ne 0 ]; then
69+
cp "${JENKINS_HOME}/"*.jks "${ARC_DIR}/"
70+
fi
71+
6772
cp "${JENKINS_HOME}/plugins/"*.[hj]pi "${ARC_DIR}/plugins"
6873
hpi_pinned_count=$(find ${JENKINS_HOME}/plugins/ -name *.hpi.pinned | wc -l)
6974
jpi_pinned_count=$(find ${JENKINS_HOME}/plugins/ -name *.jpi.pinned | wc -l)

spec/jenkins-backup_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"jenkins-backup/users/",
2626
"jenkins-backup/users/sue445/",
2727
"jenkins-backup/users/sue445/config.xml",
28+
"jenkins-backup/saml-jenkins-keystore.jks",
2829
]
2930

3031
describe tar_file("/tmp/relative_archive.tar.gz") do

0 commit comments

Comments
 (0)