summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-22 20:29:34 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-22 20:29:34 +0200
commita7908d8340072d353e3bd75626a209f45e037989 (patch)
tree41baf6e435acd2fab433fa2960348769551fd349
parent1183711232af10e474eef3bbe234b5948eac4f11 (diff)
parentb6c8ba61582d38c72b13c549e2a0699db7d553fd (diff)
downloadvyos-1x-a7908d8340072d353e3bd75626a209f45e037989.tar.gz
vyos-1x-a7908d8340072d353e3bd75626a209f45e037989.zip
Merge branch 'current' of github.com:vyos/vyos-1x into equuleus
* 'current' of github.com:vyos/vyos-1x: Jenkins: keep last 10 builds Jenkins: intruduce ARCH_OPT to support multi arch deployment Jenkins: fix dpkg architecture determination
-rw-r--r--Jenkinsfile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 184f6930a..8f11e9fb5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -59,7 +59,7 @@ def setDescription() {
/* Only keep the 10 most recent builds. */
def projectProperties = [
- [$class: 'BuildDiscarderProperty',strategy: [$class: 'LogRotator', numToKeepStr: '1']],
+ [$class: 'BuildDiscarderProperty',strategy: [$class: 'LogRotator', numToKeepStr: '10']],
]
properties(projectProperties)
@@ -131,9 +131,12 @@ pipeline {
files = findFiles(glob: '*.deb')
files.each { PACKAGE ->
def RELEASE = getGitBranchName()
- def ARCH = sh(returnStdout: true, script: "dpkg-deb -f ${pkg} Architecture").trim()
- def SUBSTRING = sh(returnStdout: true, script: "dpkg-deb -f ${pkg} Package").trim()
+ def ARCH = sh(returnStdout: true, script: "dpkg-deb -f ${PACKAGE} Architecture").trim()
+ def SUBSTRING = sh(returnStdout: true, script: "dpkg-deb -f ${PACKAGE} Package").trim()
def SSH_DIR = '~/VyOS/' + RELEASE + '/' + ARCH
+ def ARCH_OPT = ''
+ if (ARCH != 'all')
+ ARCH_OPT = '-A ' + ARCH
// No need to explicitly check the return code. The pipeline
// will fail if sh returns a non 0 exit code
@@ -144,13 +147,13 @@ pipeline {
scp ${SSH_OPTS} ${PACKAGE} ${SSH_REMOTE}:${SSH_DIR}/
"""
sh """
- ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} -A ${ARCH} remove ${RELEASE} ${SUBSTRING}'"
+ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH_OPT} remove ${RELEASE} ${SUBSTRING}'"
"""
sh """
ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} deleteunreferenced'"
"""
sh """
- ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} -A ${ARCH} includedeb ${RELEASE} ${SSH_DIR}/${PACKAGE}'"
+ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH_OPT} includedeb ${RELEASE} ${SSH_DIR}/${PACKAGE}'"
"""
}
}