aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-08-31 07:15:11 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-08-31 07:15:11 +0200
commitc43664fedcc91e4fb134960998ddb308df611e3a (patch)
tree242c907af54005f743cf0971ca2969e1cbce4174
parente9458351b7037c4113688feb7db5f61cfdd3823e (diff)
downloadjenkinsfiles-c43664fedcc91e4fb134960998ddb308df611e3a.tar.gz
lts54
-rw-r--r--Jenkinsfile.lts5469
-rw-r--r--Jenkinsfile.mainline1
-rwxr-xr-xscripts/prepare-kernel.sh2
3 files changed, 70 insertions, 2 deletions
diff --git a/Jenkinsfile.lts54 b/Jenkinsfile.lts54
new file mode 100644
index 0000000..0176e43
--- /dev/null
+++ b/Jenkinsfile.lts54
@@ -0,0 +1,69 @@
+#!/usr/bin/env groovy
+/*
+ * job name: kernel-lts54
+ */
+
+def KernelSource() {
+ dir ('source') {
+ checkout([
+ $class: 'GitSCM',
+ branches: [
+ [ name: '*/linux-5.4.y' ]
+ ],
+ extensions: [
+ [
+ $class: 'CloneOption',
+ timeout: 60
+ ]
+ ],
+ userRemoteConfigs: [
+ [ url: 'git://spunk.home.kraxel.org/linux-stable' ]
+ ]])
+ }
+}
+
+def KernelRPMBuild() {
+ sh '''
+ scripts/prepare-kernel.sh
+ yum-builddep -y kernel.spec
+ scripts/rpm-build.sh -ba kernel.spec
+ createrepo rpms
+ '''
+ archiveArtifacts 'rpms/*/*'
+}
+
+pipeline {
+ agent {
+ kubernetes {
+ yamlFile 'centos7-rpmbuild.yaml'
+ defaultContainer 'centos7-rpmbuild'
+ slaveConnectTimeout '3600'
+ nodeSelector 'kubernetes.io/os=linux,kubernetes.io/arch=amd64'
+ }
+ }
+
+ options {
+ buildDiscarder(logRotator(numToKeepStr: '3'))
+ disableConcurrentBuilds()
+ }
+
+ triggers {
+ pollSCM('H * * * *')
+ }
+
+ stages {
+
+ stage ('Prepare') {
+ steps {
+ KernelSource();
+ }
+ }
+
+ stage ("RPM Build") {
+ steps {
+ KernelRPMBuild()
+ }
+ }
+
+ }
+}
diff --git a/Jenkinsfile.mainline b/Jenkinsfile.mainline
index 413b335..4079e63 100644
--- a/Jenkinsfile.mainline
+++ b/Jenkinsfile.mainline
@@ -25,7 +25,6 @@ def KernelSource() {
def KernelRPMBuild() {
sh '''
scripts/prepare-kernel.sh
- yum repolist all
yum-builddep -y kernel.spec
scripts/rpm-build.sh -ba kernel.spec
createrepo rpms
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index d28263f..71bb1e2 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -11,7 +11,7 @@ case $version in
rpmvers="${version%-*}.0"
release="0.${version#*-}.${release}"
;;
-4.?? | 5.?)
+4.? | 4.?? | 5.? | 5.??)
variant="mainline"
rpmvers="${version}.0"
;;