summaryrefslogtreecommitdiff
path: root/vars/buildPackage.groovy
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-26 19:40:38 +0100
committerChristian Poessinger <christian@poessinger.com>2021-03-26 19:40:43 +0100
commit02803f0b66772cd2161971e40827b8caa23f508d (patch)
treeece2d7333d5451fb1e09da1d44c98e9ac9e4ccbe /vars/buildPackage.groovy
parent277561ae2611ca7ad84b7bad0eec2c6be5f369a0 (diff)
downloadvyos-build-02803f0b66772cd2161971e40827b8caa23f508d.tar.gz
vyos-build-02803f0b66772cd2161971e40827b8caa23f508d.zip
Jenkins: lib: fix file encoding (<U+200B>) issues
Diffstat (limited to 'vars/buildPackage.groovy')
-rw-r--r--vars/buildPackage.groovy17
1 files changed, 8 insertions, 9 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy
index e14106db..ba830ac3 100644
--- a/vars/buildPackage.groovy
+++ b/vars/buildPackage.groovy
@@ -131,31 +131,31 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
// Unpack files for arm64 IF they exist
try {
unstash 'binary-arm64'
- } catch (e) {
+ } catch (e) {
print "Unstash arm64 failed, ignoring"
}
-
+
if (isCustomBuild()) {
echo "Build not started from official Git repository! Artifacts are not uploaded to external repository"
return
}
echo "Uploading Artifacts to external repository"
copyArtifacts fingerprintArtifacts: true, projectName: '${JOB_NAME}', selector: specific('${BUILD_NUMBER}')
-​
+
// build up some fancy groovy variables so we do not need to write/copy
// every option over and over again!
def RELEASE = getGitBranchName()
if (getGitBranchName() == "master")
RELEASE = 'current'
-​
+
def VYOS_REPO_PATH = '/home/sentrium/web/dev.packages.vyos.net/public_html/repositories/' + RELEASE
if (getGitBranchName() == "crux")
VYOS_REPO_PATH += '/vyos'
-​
+
def SSH_OPTS = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR'
def SSH_REMOTE = env.DEV_PACKAGES_VYOS_NET_HOST // defined as global variable
def SSH_DIR = '~/VyOS/' + RELEASE
-​
+
// publish build result, using SSH-dev.packages.vyos.net Jenkins Credentials
sshagent(['SSH-dev.packages.vyos.net']) {
files = findFiles(glob: '**/*.deb')
@@ -169,10 +169,10 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
def ARCH = ''
if (PACKAGE_ARCH != 'all')
ARCH = '-A ' + PACKAGE_ARCH
-​
+
sh(script: "scp ${SSH_OPTS} ${FILE} ${SSH_REMOTE}:${SSH_DIR}")
sh(script: "ssh ${SSH_OPTS} ${SSH_REMOTE} -t \"uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH} remove ${RELEASE} ${PACKAGE}'\"")
-​
+
// Packages like FRR produce their binary in a nested path e.g. packages/frr/frr-rpki-rtrlib-dbgsym_7.5_arm64.deb,
// thus we will only extract the filename portion from FILE as the binary is scp'ed to SSH_DIR without any subpath.
def FILENAME = FILE.toString().tokenize('/')[-1]
@@ -185,6 +185,5 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
}
}
}
-
}
}