From bfe46626d5961f067a820b9541e43bdd7e8ee538 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Jan 2021 22:16:27 +0100 Subject: Jenkins: Kernel: instead of 'git clone' the source use the tarball This reduces the download and checkout overhead. --- packages/linux-kernel/Jenkinsfile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'packages/linux-kernel/Jenkinsfile') diff --git a/packages/linux-kernel/Jenkinsfile b/packages/linux-kernel/Jenkinsfile index e1fcdb1..6d9d9cd 100644 --- a/packages/linux-kernel/Jenkinsfile +++ b/packages/linux-kernel/Jenkinsfile @@ -87,13 +87,21 @@ pipeline { } } steps { - dir(env.BASE_DIR + '/linux') { - checkout([$class: 'GitSCM', - doGenerateSubmoduleConfigurations: false, - extensions: [[$class: 'CleanCheckout'], - [$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true]], - branches: [[name: 'v5.10.6' ]], - userRemoteConfigs: [[credentialsId: 'GitHub-vyosbot', url: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git']]]) + script { + dir(env.BASE_DIR) { + sh ''' + KERNEL_VER='5.10.6' + gpg2 --locate-keys torvalds@kernel.org gregkh@kernel.org + curl -OL https://www.kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VER}.tar.xz + curl -OL https://www.kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VER}.tar.sign + xz -cd linux-${KERNEL_VER}.tar.xz | gpg2 --verify linux-${KERNEL_VER}.tar.sign - + if [ $? -ne 0 ]; then + exit 1 + fi + tar xf linux-${KERNEL_VER}.tar.xz + ln -s linux-${KERNEL_VER} linux + ''' + } } } } -- cgit v1.2.3