diff options
author | Daniil Baturin <daniil@vyos.io> | 2021-02-24 13:48:37 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2021-02-24 13:48:37 +0200 |
commit | b09b7c5e1fbeb53cbeb46239fa9540e290c69e82 (patch) | |
tree | ac6726fd6735902b7596bb018505a9f90026f9fd /vars | |
parent | db912d994762bd72e80b64c16dc7c831a9a673a4 (diff) | |
download | vyos-build-b09b7c5e1fbeb53cbeb46239fa9540e290c69e82.tar.gz vyos-build-b09b7c5e1fbeb53cbeb46239fa9540e290c69e82.zip |
Fix misplaces statements in the package build script.
Diffstat (limited to 'vars')
-rw-r--r-- | vars/buildPackage.groovy | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index 0d0ec3a7..d0e76c78 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -168,12 +168,6 @@ def call(description=null, pkgList=null, buildCmd=null) { def SSH_DIR = '~/VyOS/' + RELEASE + '/' + env.DEBIAN_ARCH - def PACKAGE = sh(returnStdout: true, script: "dpkg-deb -f ${FILE} Package").trim() - def PACKAGE_ARCH = sh(returnStdout: true, script: "dpkg-deb -f ${FILE} Architecture").trim() - def ARCH = '' - if (PACKAGE_ARCH != 'all') - ARCH = '-A ' + PACKAGE_ARCH - files = findFiles(glob: '*.deb') if (files) { echo "Uploading package(s) and updating package(s) in the repository ..." @@ -181,6 +175,12 @@ def call(description=null, pkgList=null, buildCmd=null) { 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 + + def PACKAGE_ARCH = sh(returnStdout: true, script: "dpkg-deb -f ${FILE} Architecture").trim() + def ARCH = '' + if (PACKAGE_ARCH != 'all') + ARCH = '-A ' + PACKAGE_ARCH + sh """ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c 'mkdir -p ${SSH_DIR}'" scp ${SSH_OPTS} ${FILE} ${SSH_REMOTE}:${SSH_DIR}/ |