diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/frr/Jenkinsfile | 2 | ||||
-rw-r--r-- | packages/linux-kernel/Jenkinsfile | 109 | ||||
-rw-r--r-- | packages/netfilter/Jenkinsfile | 21 |
3 files changed, 110 insertions, 22 deletions
diff --git a/packages/frr/Jenkinsfile b/packages/frr/Jenkinsfile index a5558556..245519bd 100644 --- a/packages/frr/Jenkinsfile +++ b/packages/frr/Jenkinsfile @@ -27,5 +27,5 @@ def pkgList = [ 'buildCmd': '''cd ..; ./build-frr.sh'''], ] -// Start package build using library function from https://github.com/c-po/vyos-build +// Start package build using library function from https://github.com/vyos/vyos-build buildPackage('FRRouting', pkgList) diff --git a/packages/linux-kernel/Jenkinsfile b/packages/linux-kernel/Jenkinsfile index 26081116..c53ac3e3 100644 --- a/packages/linux-kernel/Jenkinsfile +++ b/packages/linux-kernel/Jenkinsfile @@ -62,21 +62,30 @@ pipeline { } environment { DEBIAN_ARCH = sh(returnStdout: true, script: 'dpkg --print-architecture').trim() - BASE_DIR = 'packages/linux-kernel' + BASE_DIR = getJenkinsfilePath() + CHANGESET_DIR = getChangeSetPath() } stages { stage('Fetch') { steps { script { - dir('build') { - checkout scm - } + checkout scm + echo env.CHANGESET_DIR } } } stage('Git Clone - Components') { parallel { stage('Kernel') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR + '/linux') { checkout([$class: 'GitSCM', @@ -84,12 +93,20 @@ pipeline { extensions: [[$class: 'CleanCheckout'], [$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]], branches: [[name: 'v4.19.128' ]], - userRemoteConfigs: [[url: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git']]]) + userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git']]]) } - sh "pwd; ls -al" } } stage('Kernel Firmware') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR + '/linux-firmware') { checkout([$class: 'GitSCM', @@ -97,42 +114,69 @@ pipeline { extensions: [[$class: 'CleanCheckout'], [$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]], branches: [[name: '20191022' ]], - userRemoteConfigs: [[url: 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git']]]) + userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git']]]) } } } stage('WireGuard') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR + '/wireguard') { checkout([$class: 'GitSCM', doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout']], branches: [[name: 'debian/1.0.20200319-1_bpo10+1' ]], - userRemoteConfigs: [[url: 'https://salsa.debian.org/debian/wireguard.git']]]) + userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://salsa.debian.org/debian/wireguard.git']]]) } dir(env.BASE_DIR + '/wireguard-linux-compat') { checkout([$class: 'GitSCM', doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout']], branches: [[name: 'debian/1.0.20200429-2_bpo10+1' ]], - userRemoteConfigs: [[url: 'https://salsa.debian.org/debian/wireguard-linux-compat.git']]]) + userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://salsa.debian.org/debian/wireguard-linux-compat.git']]]) } } } stage('Accel-PPP') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR + '/accel-ppp') { checkout([$class: 'GitSCM', doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout']], branches: [[name: 'ed7b28722ec85' ]], - userRemoteConfigs: [[url: 'https://github.com/accel-ppp/accel-ppp.git']]]) + userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://github.com/accel-ppp/accel-ppp.git']]]) } } } } } stage('Compile Kernel') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR) { sh "./build-kernel.sh" @@ -143,6 +187,15 @@ pipeline { stage('Kernel Module(s)') { parallel { stage('WireGuard') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR) { // In Debian wireguard repo commit edb7124c866ea0e506278c311fc82dfde1f957be @@ -155,6 +208,15 @@ pipeline { } } stage('Accel-PPP') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR) { sh "./build-accel-ppp.sh" @@ -162,6 +224,15 @@ pipeline { } } stage('Intel Driver(s)') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR) { sh "./build-intel-drivers.sh" @@ -169,6 +240,15 @@ pipeline { } } stage('Intel QuickAssist Technology') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR) { sh "./build-intel-qat.sh" @@ -181,6 +261,15 @@ pipeline { // again on the kernel source and this could confuse other build systems // like generating Intel or Accel-PPP drivers. Better safe then sorry! stage('Linux Firmware') { + when { + beforeOptions true + beforeAgent true + anyOf { + changeset pattern: "${env.CHANGESET_DIR}" + triggeredBy 'TimerTrigger' + triggeredBy cause: "UserIdCause" + } + } steps { dir(env.BASE_DIR) { sh "./build-linux-firmware.sh" diff --git a/packages/netfilter/Jenkinsfile b/packages/netfilter/Jenkinsfile index 882ba034..60df1318 100644 --- a/packages/netfilter/Jenkinsfile +++ b/packages/netfilter/Jenkinsfile @@ -21,13 +21,13 @@ @Library('vyos-build@current')_ def pkgList = [ - // pkg-libnftnl + // libnftnl ['name': 'pkg-libnftnl', 'scmCommit': 'debian/1.1.7-1', 'scmUrl': 'https://salsa.debian.org/pkg-netfilter-team/pkg-libnftnl.git', 'buildCmd': 'dpkg-buildpackage -uc -us -tc -b'], - // pkg-nftables + // nftables ['name': 'pkg-nftables', 'scmCommit': 'debian/0.9.6-1', 'scmUrl': 'https://salsa.debian.org/pkg-netfilter-team/pkg-nftables.git', @@ -35,18 +35,17 @@ def pkgList = [ sed -i "s/debhelper-compat.*/debhelper-compat (= 12),/" debian/control; dpkg-buildpackage -uc -us -tc -b'''], - // pkg-conntrack-tools - ['name': 'pkg-conntrack-tools', - 'scmCommit': 'debian/1%1.4.6-1', - 'scmUrl': 'https://salsa.debian.org/pkg-netfilter-team/pkg-conntrack-tools.git', + // libnetfilter-conntrack + ['name': 'pkg-libnetfilter-conntrack', + 'scmCommit': 'debian/1.0.8-1', + 'scmUrl': 'https://salsa.debian.org/pkg-netfilter-team/pkg-libnetfilter-conntrack.git', 'buildCmd': 'dpkg-buildpackage -uc -us -tc -b'], - // pkg-conntrack-tools + // conntrack-tools ['name': 'pkg-conntrack-tools', - 'scmCommit': 'debian/1.0.8-1', - 'scmUrl': 'https://salsa.debian.org/pkg-netfilter-team/pkg-libnetfilter-conntrack.git', - 'buildCmd': '''sudo dpkg -i ../libnetfilter*.deb; - dpkg-buildpackage -uc -us -tc -b'''] + 'scmCommit': 'debian/1%1.4.6-1', + 'scmUrl': 'https://salsa.debian.org/pkg-netfilter-team/pkg-conntrack-tools.git', + 'buildCmd': '''sudo dpkg -i ../libnetfilter*.deb && dpkg-buildpackage -uc -us -tc -b'''], ] // Start package build using library function from https://github.com/c-po/vyos-build |