summaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile23
1 files changed, 13 insertions, 10 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 48bf5a7d..5e30c423 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -38,7 +38,7 @@ node('Docker') {
env.USR_ID = sh(returnStdout: true, script: 'id -u').toString().trim()
env.GRP_ID = sh(returnStdout: true, script: 'id -g').toString().trim()
env.DOCKER_ARGS = '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=' + env.USR_ID + ' -e GOSU_GID=' + env.GRP_ID
- env.BASE_VERSION = '1.4-rolling-'
+ env.BASE_VERSION = '1.5-rolling-'
}
}
}
@@ -53,15 +53,13 @@ pipeline {
reuseNode true
}
}
- triggers {
- cron('H 3 * * *')
- }
parameters {
string(name: 'BUILD_BY', defaultValue: 'autobuild@vyos.net', description: 'Builder identifier (e.g. jrandomhacker@example.net)')
string(name: 'BUILD_VERSION', defaultValue: env.BASE_VERSION + 'ISO8601-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')
+ booleanParam(name: 'BUILD_PUBLISH', defaultValue: false, description: 'Publish this build AWS S3')
booleanParam(name: 'BUILD_SNAPSHOT', defaultValue: false, description: 'Upload image to AWS S3 snapshot bucket')
+ booleanParam(name: 'TEST_SMOKETESTS', defaultValue: true, description: 'Run Smoketests after ISO build')
+ booleanParam(name: 'TEST_RAID1', defaultValue: true, description: 'Perform RAID1 installation tests')
}
options {
disableConcurrentBuilds()
@@ -91,10 +89,10 @@ pipeline {
currentBuild.description = sprintf('Git SHA1: %s', commitId[-11..-1])
def CUSTOM_PACKAGES = ''
- if (params.BUILD_SMOKETESTS)
+ if (params.TEST_SMOKETESTS)
CUSTOM_PACKAGES = '--custom-package vyos-1x-smoketest'
- def VYOS_VERSION = params.BUILD_BY
+ def VYOS_VERSION = params.BUILD_VERSION
if (params.BUILD_VERSION == env.BASE_VERSION + 'ISO8601-TIMESTAMP')
VYOS_VERSION = env.BASE_VERSION + sh(returnStdout: true, script: 'date -u +%Y%m%d%H%M').toString().trim()
@@ -115,6 +113,7 @@ pipeline {
stage('Smoketests for RAID-1 system installation') {
when {
expression { fileExists 'build/live-image-amd64.hybrid.iso' }
+ expression { return params.TEST_RAID1 }
}
steps {
sh "sudo make testraid"
@@ -122,7 +121,7 @@ pipeline {
}
stage('Smoketests') {
when {
- expression { return params.BUILD_SMOKETESTS }
+ expression { return params.TEST_SMOKETESTS }
}
parallel {
stage('CLI validation') {
@@ -151,8 +150,12 @@ pipeline {
if (isCustomBuild())
return
+ // always store local artifacts
+ archiveArtifacts artifacts: '**/build/vyos-*.iso, **/build/vyos-*.qcow2',
+ allowEmptyArchive: true
+
// only deploy ISO if requested via parameter
- if (! params.BUILD_PUBLISH)
+ if (!params.BUILD_PUBLISH)
return
files = findFiles(glob: 'build/vyos*.iso')