blob: b9d7df6dc4a00cfac423facd718bd3a914843c9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
- job:
name: build-odp-dpdk-deb
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-read
- job-extended-read
- job-build
- job-cancel
- build-discarder:
num-to-keep: 30
days-to-keep: 30
artifact-num-to-keep: 1
disabled: false
node: docker-jessie-arm64
display-name: 'Build debian source for opendataplane.org (implementation odp-dpdk)'
scm:
- git:
url: https://git.linaro.org/lng/odp-dpdk.git
refspec: +refs/heads/master:refs/remotes/origin/master
name: origin
branches:
- refs/heads/master
basedir: odp-dpdk
skip-tag: true
shallow-clone: false
wipe-workspace: false
wrappers:
- timestamps
- build-name:
name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
- timeout:
timeout: 20
builders:
- shell: |
#!/bin/bash
set -ex
pkg_source=odp-dpdk
cd ${pkg_source}
base_version=$(git describe --long --match='v*' | sed -e 's/^v//' | cut -d'-' -f1 | cut -d'_' -f1)
nb_commit=$(git describe --long --match='v*' | sed -e 's/^v//' | cut -d'-' -f2)
scm_commit=$(git log -n1 --pretty=format:%h)
pkg_version=${base_version}+git${nb_commit}+${scm_commit}
pkg_dir=${pkg_source}-${pkg_version}
git config tar.tar.xz.command "xz -c"
git archive --format=tar.xz --prefix=${pkg_dir}/ origin/master > ../${pkg_source}_${pkg_version}.orig.tar.xz
cd ..
tar xf ${pkg_source}_${pkg_version}.orig.tar.xz
packaging_dir=odp-packaging
packaging_repository=https://git.linaro.org/lng/${packaging_dir}.git
git clone -b dpdk --depth 1 ${packaging_repository}
packaging_commit=$(cd ${packaging_dir} && git log -n1 --pretty=format:%h)
mv ${packaging_dir}/pkg/debian ${pkg_dir}
rm -rf ${pkg_source} ${packaging_dir}
cd ${pkg_dir}
pkg_repository=https://git.linaro.org/lng/odp-dpdk.git
current_date=$(date -R)
cat > debian/changelog << EOF
${pkg_source} (${pkg_version}-0linaro1) unstable; urgency=medium
* CI - ${pkg_source} snapshot:
- repository: ${pkg_repository}
- commit: ${scm_commit}
- build: ${BUILD_URL}
- debian/ repository: ${packaging_repository}
- debian/ commit: ${packaging_commit}
-- Anders Roxell <anders.roxell@linaro.org> ${current_date}
EOF
dpkg-buildpackage -d -nc -us -uc -rfakeroot -S -sa
cd ..
cat > ${WORKSPACE}/build-package.properties <<EOF
source=${BUILD_URL}/artifact/${pkg_source}_${pkg_version}-0linaro1.dsc
repo=ODP:Staging
EOF
publishers:
- archive:
artifacts: '*.dsc, *.gz, *.xz'
- trigger-parameterized-builds:
- project: build-package-obs
property-file: build-package.properties
condition: SUCCESS
- email:
recipients: 'anders.roxell@linaro.org fathi.boudra@linaro.org'
|