summaryrefslogtreecommitdiff
path: root/vars
diff options
context:
space:
mode:
Diffstat (limited to 'vars')
-rw-r--r--vars/buildPackage.groovy23
-rw-r--r--vars/cloneAndBuild.groovy2
-rw-r--r--vars/isCustomBuild.groovy4
3 files changed, 25 insertions, 4 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy
index 531e51d9..239ab465 100644
--- a/vars/buildPackage.groovy
+++ b/vars/buildPackage.groovy
@@ -115,7 +115,13 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP
}
}
when {
- equals expected: true, actual: buildArm
+ beforeAgent true
+ allOf {
+ expression {
+ return env.ARM64_BUILD_DISABLED != 'true'
+ }
+ equals expected: true, actual: buildArm
+ }
}
steps {
script {
@@ -202,7 +208,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP
}
}
- files = findFiles(glob: '**/*.deb')
+ files = findFiles(glob: '**/*.deb', excludes: '**/Makefile.deb')
if (files) {
echo "Remove deprecated binary package(s) from the repository..."
files.each { FILE ->
@@ -235,7 +241,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP
}
}
- files = findFiles(glob: '**/*.deb')
+ files = findFiles(glob: '**/*.deb', excludes: '**/Makefile.deb')
if (files) {
echo "Uploading binary package(s) to the repository ..."
files.each { FILE ->
@@ -245,11 +251,20 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false, changesP
def ARCH = ''
if (PACKAGE_ARCH != 'all')
ARCH = '-A ' + PACKAGE_ARCH
+ def EXTRA_ARGS = ''
+ // Add generic Priority if missing
+ if (sh(returnStatus: true, script: "dpkg-deb -f ${FILE} | grep Priority:") != 0) {
+ EXTRA_ARGS = EXTRA_ARGS + ' -P optional'
+ }
+ // Add generic Section if missing
+ if (sh(returnStatus: true, script: "dpkg-deb -f ${FILE} | grep Section:") != 0) {
+ EXTRA_ARGS = EXTRA_ARGS + ' -S misc'
+ }
sh(script: "scp ${SSH_OPTS} ${FILE} ${SSH_REMOTE}:${SSH_DIR}")
// 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('/').last()
- sh(script: "ssh ${SSH_OPTS} ${SSH_REMOTE} -t \"uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH} includedeb ${RELEASE} ${SSH_DIR}/${FILENAME}'\"")
+ sh(script: "ssh ${SSH_OPTS} ${SSH_REMOTE} -t \"uncron-add 'reprepro -v -b ${VYOS_REPO_PATH}${EXTRA_ARGS} ${ARCH} includedeb ${RELEASE} ${SSH_DIR}/${FILENAME}'\"")
}
sh(script: "ssh ${SSH_OPTS} ${SSH_REMOTE} -t \"uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} deleteunreferenced'\"")
}
diff --git a/vars/cloneAndBuild.groovy b/vars/cloneAndBuild.groovy
index f4114a68..9945da88 100644
--- a/vars/cloneAndBuild.groovy
+++ b/vars/cloneAndBuild.groovy
@@ -46,6 +46,8 @@ def call(description, architecture, pkgList, buildCmd) {
}
}
+ sh(script: libraryResource("branding.sh"))
+
// compile the source(s) ...
if (pkgList) {
pkgList.each { pkg ->
diff --git a/vars/isCustomBuild.groovy b/vars/isCustomBuild.groovy
index c60ed883..6ea3a9d8 100644
--- a/vars/isCustomBuild.groovy
+++ b/vars/isCustomBuild.groovy
@@ -22,5 +22,9 @@ def call() {
def gitURI = 'git@github.com:vyos/' + getGitRepoName()
def httpURI = 'https://github.com/vyos/' + getGitRepoName()
+ if (env.CUSTOM_BUILD_CHECK_DISABLED) {
+ return false
+ }
+
return !((getGitRepoURL() == gitURI) || (getGitRepoURL() == httpURI)) || isPullRequest()
}