Browse Source

support for Ubuntu Jammy build added to Jenkinsfile

main
Vítězslav Dvořák 2 months ago
parent
commit
51a9450491
  1. 15
      debian/Jenkinsfile

15
debian/Jenkinsfile vendored

@ -1,10 +1,9 @@
#!groovy
String[] distributions = ['debian:buster', 'debian:bullseye', 'debian:bookworm', 'ubuntu:focal', 'ubuntu:hirsute', 'ubuntu:impish']
String[] distributions = ['debian:buster', 'debian:bullseye', 'debian:bookworm', 'ubuntu:focal', 'ubuntu:hirsute', 'ubuntu:impish', 'ubuntu:jammy']
String vendor = 'vitexsoftware'
String distribution = ''
String architecture = ''
//String distroFamily = ''
String distroCodename = ''
String ver = ''
@ -31,9 +30,9 @@ distributions.each {
def buildImage = ''
node( architecture ) {
node {
ansiColor('xterm') {
stage('Checkout ' + architecture + ' ' + distribution) {
stage('Checkout ' + distribution) {
buildImage = docker.image(vendor + '/' + distribution)
sh 'git checkout debian/changelog'
def VERSION = sh (
@ -42,7 +41,7 @@ distributions.each {
).trim()
ver = VERSION + '~' + distroCodename + '~' + env.BUILD_NUMBER
}
stage('Build ' + architecture + ' ' + distribution) {
stage('Build ' + distribution) {
buildImage.inside {
sh 'dch -b -v ' + ver + ' "' + env.BUILD_TAG + '"'
sh 'sudo apt-get update'
@ -52,18 +51,18 @@ distributions.each {
}
}
stage('Test ' + architecture + ' ' + distribution) {
stage('Test ' + distribution) {
buildImage.inside {
def debconf_debug = 0 //Set to "5" or "developer" to debug debconf
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; cd $WORKSPACE'
sh 'echo "deb [trusted=yes] file://///$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list'
sh 'sudo apt-get update'
sh 'echo "INSTALATION"'
sh 'IFS="\n\b"; for package in `ls $WORKSPACE/dist/debian/ | grep .deb | awk -F_ \'{print \$1}\'` ; do echo -e "${GREEN} installing ${package} on `lsb_release -sc` ${ENDCOLOR} " ; sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + debconf_debug + ' apt-get -y install $package ; done;'
sh 'IFS="\n\b"; for package in `ls $WORKSPACE/dist/debian/ | grep .deb | awk -F_ \'{print \$1}\'` ; do echo -e "${GREEN} installing ${package} on `lsb_release -sc` ${ENDCOLOR} " ; sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + debconf_debug + ' apt-get -y install $package ; done;'
stash includes: 'dist/**', name: 'dist-' + distroCodename
}
}
stage('Copy artifacts ' + architecture + ' ' + distribution ) {
stage('Copy artifacts ' + distribution ) {
buildImage.inside {
sh 'mv $WORKSPACE/dist/debian/*.deb $WORKSPACE'
}

Loading…
Cancel
Save