osmith has uploaded this change for review.
jobs/gerrit-verifications-dahdi: use linux-shallow-clone
Related: OS#6938
Change-Id: Ie8d9be886cc1d089e015f03bcedf0307f4f312e4
---
M jobs/gerrit-verifications-dahdi.yml
1 file changed, 31 insertions(+), 57 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/98/42098/1
diff --git a/jobs/gerrit-verifications-dahdi.yml b/jobs/gerrit-verifications-dahdi.yml
index c0b7911..3711a05 100644
--- a/jobs/gerrit-verifications-dahdi.yml
+++ b/jobs/gerrit-verifications-dahdi.yml
@@ -1,37 +1,20 @@
- project:
- name: gerrit-dahdi-linux-stable
- type: stable
- repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git'
- linux-ver:
- - "linux-4.19.y"
- - "linux-5.10.y"
- - "linux-6.1.y"
- - "linux-6.12.y"
- - "linux-rolling-stable"
+ name: gerrit-dahdi-linux
+ linux-repo-branch:
+ - "torvalds-master"
+ - "stable-linux-4.19.y"
+ - "stable-linux-5.10.y"
+ - "stable-linux-6.1.y"
+ - "stable-linux-6.12.y"
+ - "stable-linux-rolling-stable"
jobs:
- - 'gerrit-dahdi-linux-{type}-{linux-ver}'
-
-- project:
- name: gerrit-dahdi-linux-torvalds
- type: torvalds
- repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
- linux-ver:
- - "master"
- jobs:
- - 'gerrit-dahdi-linux-{type}-{linux-ver}'
-
+ - 'gerrit-dahdi-linux-{linux-repo-branch}'
- job-template:
- name: 'gerrit-dahdi-linux-{type}-{linux-ver}'
+ name: 'gerrit-dahdi-linux-{linux-repo-branch}'
project-type: freestyle
- node: osmocom-gerrit
- # These jobs need an entire linux tree. We try to avoid cloning it more
- # often than necessary, therefore we keep the workspace directory between
- # job runs. Jenkins creates a new workspace for each concurrent job, which
- # ends up consuming a lot of disk space so we disable it here. Besides disk
- # space considerations, this job would run fine concurrently.
- concurrent: false
- retry-count: 0 # scm checkout
+ node: linux-shallow-clone
+ concurrent: true
properties:
- build-discarder:
days-to-keep: 30
@@ -39,24 +22,19 @@
description: |
Pending gerrit code reviews of
<a href="https://gerrit.osmocom.org/#/q/status:open+project:dahdi-linux">dahdi-linux</a>
- built against linux {linux-ver}
+ built against linux {linux-repo-branch}
(<a href="https://osmocom.org/issues/5407">OS#5407</a>)
<br/><br/>
<b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b>
scm:
- # Let jenkins clone the big linux repository and keep it between builds
- # (wipe-workspace is false). Clone dahdi-linux with code from gerrit in
- # the shell part below.
- git:
- basedir: 'linux'
- url: '{repo}'
+ url: 'https://gerrit.osmocom.org/dahdi-linux'
branches:
- - '{linux-ver}'
- shallow-clone: true
- wipe-workspace: false
- clean:
- before: true
+ - '$GERRIT_BRANCH'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: gerrit
+ wipe-workspace: true
triggers:
- gerrit:
@@ -81,27 +59,23 @@
builders:
- shell: |
- git -C linux config gc.autoDetach false
- git -C linux gc --auto
-
- rm -rf dahdi-linux
- git init dahdi-linux
- cd dahdi-linux
- git config advice.detachedHead false
- git fetch \
- --depth=1 \
- https://gerrit.osmocom.org/dahdi-linux \
- "$GERRIT_REFSPEC"
- git checkout FETCH_HEAD
- cd ..
-
docker run \
--rm=true \
-e "KSRC=/linux" \
- -v "$PWD/dahdi-linux:/build" \
- -v "$PWD/linux:/linux" \
+ -v "$PWD:/build" \
+ -v "$HOME/linux.git:/linux.git:ro" \
"$USER/debian-bookworm-build" \
- timeout 10m su build -c /build/contrib/jenkins.sh
+ sh -e -x -c "
+ git config --global --add safe.directory /linux.git
+ git -C /linux.git -c color.ui=always log -1 --oneline {linux-repo-branch}
+ git clone -q /linux.git -b {linux-repo-branch} /linux
+ chown -R build:build /linux
+ timeout 10m su build -c /build/contrib/jenkins.sh
+ "
+
+ wrappers:
+ - ansicolor:
+ colormap: xterm
publishers:
- warnings:
To view, visit change 42098. To unsubscribe, or for help writing mail filters, visit settings.