From 12a7a498ce70c04d78fccb6e53496f946c54576b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 22 Sep 2019 20:16:08 +0200 Subject: Jenkins: fix dpkg architecture determination --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index b937d22e6..386058a79 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -131,8 +131,8 @@ 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 // No need to explicitly check the return code. The pipeline -- cgit v1.2.3 From 67f60efcc73fae0fe6712b41485a2a7407258359 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 22 Sep 2019 20:24:43 +0200 Subject: Jenkins: intruduce ARCH_OPT to support multi arch deployment --- Jenkinsfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 386058a79..b9aa54f21 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -134,6 +134,9 @@ pipeline { 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}'" """ } } -- cgit v1.2.3 From b6c8ba61582d38c72b13c549e2a0699db7d553fd Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 22 Sep 2019 20:25:29 +0200 Subject: Jenkins: keep last 10 builds --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index b9aa54f21..cd2aa528d 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) -- cgit v1.2.3