summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-10-18 17:15:29 +0200
committerChristian Poessinger <christian@poessinger.com>2020-10-18 17:15:29 +0200
commitace5db494150569c538d6e29d34838b9649ac3b7 (patch)
tree4e45ffba5c784682178fe748c12633b6d4a50735
parent035ba4bdb277ba753c39ce133f5c181087facf04 (diff)
downloadvyos-build-ace5db494150569c538d6e29d34838b9649ac3b7.tar.gz
vyos-build-ace5db494150569c538d6e29d34838b9649ac3b7.zip
Jenkins: fix path in sha256 checksum file
-rw-r--r--Jenkinsfile36
1 files changed, 19 insertions, 17 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 4f56bde7..42264720 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -192,23 +192,25 @@ pipeline {
if (files) {
// publish build result, using SSH-dev.packages.vyos.net Jenkins Credentials
sshagent(['SSH-dev.packages.vyos.net']) {
- // build up some fancy groovy variables so we do not need to write/copy
- // every option over and over again!
- def ARCH = sh(returnStdout: true, script: "dpkg --print-architecture").trim()
- def ISO = sh(returnStdout: true, script: "ls build/vyos-*.iso").trim()
- def SSH_DIR = '/home/sentrium/web/downloads.vyos.io/public_html/rolling/' + getGitBranchName() + '/' + ARCH
- def SSH_OPTS = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
- def SSH_REMOTE = 'khagen@10.217.48.113'
-
- // No need to explicitly check the return code. The pipeline
- // will fail if sh returns a non 0 exit code
- sh """
- sha256sum ${ISO} > ${ISO}.sha256
- ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c 'mkdir -p ${SSH_DIR}'"
- ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c 'find ${SSH_DIR} -type f -mtime +28 -exec rm -f {} \\;'"
- scp ${SSH_OPTS} -r ${ISO} ${ISO}.sha256 ${SSH_REMOTE}:${SSH_DIR}/
- ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c '/usr/bin/make-latest-rolling-symlink.sh'"
- """
+ dir('build') {
+ // build up some fancy groovy variables so we do not need to write/copy
+ // every option over and over again!
+ def ARCH = sh(returnStdout: true, script: "dpkg --print-architecture").trim()
+ def ISO = sh(returnStdout: true, script: "ls vyos-*.iso").trim()
+ def SSH_DIR = '/home/sentrium/web/downloads.vyos.io/public_html/rolling/' + getGitBranchName() + '/' + ARCH
+ def SSH_OPTS = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+ def SSH_REMOTE = 'khagen@10.217.48.113'
+
+ // No need to explicitly check the return code. The pipeline
+ // will fail if sh returns a non 0 exit code
+ sh """
+ sha256sum ${ISO} > ${ISO}.sha256
+ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c 'mkdir -p ${SSH_DIR}'"
+ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c 'find ${SSH_DIR} -type f -mtime +28 -exec rm -f {} \\;'"
+ scp ${SSH_OPTS} -r ${ISO} ${ISO}.sha256 ${SSH_REMOTE}:${SSH_DIR}/
+ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c '/usr/bin/make-latest-rolling-symlink.sh'"
+ """
+ }
}
// Upload to Amazon S3 storage