summaryrefslogtreecommitdiff
path: root/vars
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-20 23:28:59 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-20 23:43:39 +0200
commitee8c079cfae7472cf2963c43836e3bb63a0b52d8 (patch)
tree4b1d1dae4962f69fef95bf71aa02074e957a80a7 /vars
parenta20fedacdf3503369b38bd84fb4014c178a33003 (diff)
downloadvyos-build-ee8c079cfae7472cf2963c43836e3bb63a0b52d8.tar.gz
vyos-build-ee8c079cfae7472cf2963c43836e3bb63a0b52d8.zip
Jenkins: lib: download repository parallel to Jenkinsfile location
... this is only releavant when building packages like FRR, Netfilter etc., which are generated via additional Jenkinsfiles from vyos-build.
Diffstat (limited to 'vars')
-rw-r--r--vars/buildPackage.groovy7
1 files changed, 3 insertions, 4 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy
index dbec414b..927ced38 100644
--- a/vars/buildPackage.groovy
+++ b/vars/buildPackage.groovy
@@ -80,7 +80,7 @@ def call(description, pkgList) {
currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1])
pkgList.each { pkg ->
- dir(pkg.name) {
+ dir(env.BASE_DIR + pkg.name) {
checkout([$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanCheckout']],
@@ -105,7 +105,7 @@ def call(description, pkgList) {
steps {
script {
pkgList.each { pkg ->
- dir(pkg.name) {
+ dir(env.BASE_DIR + pkg.name) {
sh "pwd; ls -al"
sh pkg.buildCmd
}
@@ -147,14 +147,13 @@ def call(description, pkgList) {
if (env.DEBIAN_ARCH != 'all')
ARCH_OPT = '-A ' + env.DEBIAN_ARCH
- sh """scp ${SSH_OPTS} *.deb ${SSH_REMOTE}:${SSH_DIR}/"""
-
files = findFiles(glob: '*.deb')
files.each { FILE ->
def PKG = sh(returnStdout: true, script: "dpkg-deb -f ${FILE} Package").trim()
// No need to explicitly check the return code. The pipeline
// will fail if sh returns a noni-zero exit code
sh """
+ scp ${SSH_OPTS} ${FILE} ${SSH_REMOTE}:${SSH_DIR}/
ssh ${SSH_OPTS} ${SSH_REMOTE} "mkdir -p ${SSH_DIR}"
ssh ${SSH_OPTS} ${SSH_REMOTE} "\
uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH_OPT} remove ${RELEASE} ${PKG}'; \