summaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-25 07:47:41 +0100
committerChristian Poessinger <christian@poessinger.com>2021-03-25 09:03:21 +0100
commit9e128d4dc13c8f902224309bf287a2e3de7adc3c (patch)
tree733f2bd6fdc9a1cddba94d541c6c29932cf27dea /Jenkinsfile
parent2824905861cdc4a37fa9d324c19d33d8b8225a16 (diff)
downloadvyos-build-9e128d4dc13c8f902224309bf287a2e3de7adc3c.tar.gz
vyos-build-9e128d4dc13c8f902224309bf287a2e3de7adc3c.zip
Jenkins: add build parameter for image upload and smoketests
(cherry picked from commit 3ccfd2bf06c7d11d6244aa1307d5ac2142de0cdb)
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 2fa754a1..2432f6ac 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -107,6 +107,8 @@ pipeline {
parameters {
string(name: 'BUILD_BY', defaultValue: 'autobuild@vyos.net', description: 'Builder identifier (e.g. jrandomhacker@example.net)')
string(name: 'BUILD_VERSION', defaultValue: '1.3-rolling-' + env.TIMESTAMP, description: 'Version number (release builds only)')
+ booleanParam(name: 'BUILD_PUBLISH', defaultValue: true, description: 'Publish this build to downloads.vyos.io and AWS S3')
+ booleanParam(name: 'BUILD_SMOKETESTS', defaultValue: true, description: 'Include Smoketests in ISO image')
}
triggers {
cron('H 4 * * *')
@@ -140,14 +142,16 @@ pipeline {
def commitId = sh(returnStdout: true, script: 'git rev-parse --short=11 HEAD').trim()
currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1])
+ def CUSTOM_PACKAGES = ''
+ if (params.BUILD_SMOKETESTS)
+ CUSTOM_PACKAGES = '--custom-package vyos-1x-smoketest'
+
sh """
- env
./configure \
--build-by ${params.BUILD_BY} \
--debian-mirror http://ftp.us.debian.org/debian/ \
--build-type release \
- --version ${params.BUILD_VERSION} \
- --custom-package "vyos-1x-smoketest"
+ --version ${params.BUILD_VERSION} ${CUSTOM_PACKAGES}
sudo make iso
"""
@@ -158,6 +162,9 @@ pipeline {
}
}
stage('QEMU') {
+ when {
+ expression { return params.BUILD_SMOKETESTS }
+ }
parallel {
stage('Smoketests with vyos-configd') {
when {
@@ -192,6 +199,8 @@ pipeline {
// only deploy ISO if build from official repository
if (isCustomBuild())
return
+ if (! params.BUILD_PUBLISH)
+ return
files = findFiles(glob: 'build/vyos*.iso')
if (files) {