blob: 467b26dd52470148abd7738dc01fa8d25a58641e (
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
- job:
name: tcwg-backport
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
everyone-flat:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 60
parameters:
- string:
name: GERRIT_PATCHSET_REVISION
default: refs/remotes/origin/linaro/gcc-5-branch
description: 'Patched GCC revision'
- string:
name: GERRIT_BRANCH
default: linaro-local/gcc-5-integration-branch
description: 'Base GCC branch'
- string:
name: gcc_orig
default: gcc_patch_prev
description: 'Original GCC revision'
- string:
name: log_server
default: dev-01.tcwglab:/home/tcwg-buildslave/logs
description: 'Log_Server'
- string:
name: target_list
default: 'aarch64-linux-gnu armv8l-linux-gnueabihf arm-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf arm-eabi aarch64-none-elf aarch64_be-none-elf tcwg-x86_64-build'
description: 'List of targets -- aarch64-linux-gnu armv8l-linux-gnueabihf arm-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf arm-eabi aarch64-none-elf aarch64_be-none-elf tcwg-x86_64-build tcwg-x86_32-build tcwg-tk1_32-build tcwg-apm_64-build tcwg-apm_32-build -- the tcwg-* targets should be a subset of slave axis'
- string:
name: abe_branch
default: tested
description: 'ABE revision to use'
- string:
name: scripts_branch
default: tested
description: 'jenkins-scripts revision to use'
- bool:
name: rebuild
default: false
description: 'Rebuild the toolchain even if results are already on logserver'
- bool:
name: dryrun
default: false
description: 'Dry-run, do nothing, just print steps'
disabled: false
node: tcwg-coordinator
concurrent: true
display-name: 'TCWG AAA Backport'
scm:
- git:
url: https://git.linaro.org/toolchain/gcc.git
refspec: +refs/changes/*:refs/remotes/changes/*
basedir: gcc
branches:
- ${GERRIT_PATCHSET_REVISION}
skip-tag: true
wipe-workspace: false
clean:
before: true
reference-repo: /home/tcwg-buildslave/snapshots-ref/gcc.git
choosing-strategy: gerrit
- git:
url: https://git.linaro.org/toolchain/abe.git
refspec: +refs/changes/*:refs/remotes/changes/*
basedir: abe
branches:
- $abe_branch
skip-tag: true
shallow-clone: true
wipe-workspace: true
- git:
url: https://git.linaro.org/toolchain/jenkins-scripts.git
refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
branches:
- $scripts_branch
basedir: jenkins-scripts
skip-tag: true
shallow-clone: true
wipe-workspace: true
triggers:
- gerrit:
server-name: 'review.linaro.org'
override-votes: true
gerrit-build-successful-verified-value: 1
gerrit-build-failed-verified-value: -1
gerrit-build-successful-codereview-value: 1
gerrit-build-failed-codereview-value: -1
readable-message: true
successful-message: 'Sanity check OK'
failure-message: 'Sanity check FAIL'
trigger-for-unreviewed-patches: true
projects:
- project-compare-type: 'PLAIN'
project-pattern: 'toolchain/gcc'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**'
wrappers:
- timeout:
timeout: 3000
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
- build-name:
name: '#${BUILD_NUMBER}-${ENV,var="GERRIT_PATCHSET_REVISION"}'
builders:
- shell: |
#!/bin/bash
set -e
set -x
# Make sure we start from a clean state
rm -f gcc_orig_parameters gcc_patch_prev compare_results_parameters
# For git_rev_parse
. ./jenkins-scripts/jenkins-helpers.sh
# Split in two commands to help debug traces if needed
commit_msg=$(git -C gcc log --pretty=%b -n1 $GERRIT_PATCHSET_REVISION)
commit_msg=$(echo $commit_msg | grep DO_NOT_RUN_VALIDATION) || true
if [ "x$commit_msg" != "x" ]; then
exit 0
fi
abe_rev=$(git_rev_parse abe $abe_branch)
gcc_patch_rev=$(git_rev_parse gcc $GERRIT_PATCHSET_REVISION)
if [ x"$gcc_orig" = x"gcc_patch_prev" ]; then
gcc_orig="$gcc_patch_rev^"
fi
gcc_orig_rev=$(git_rev_parse gcc $gcc_orig)
case ${GERRIT_BRANCH} in
*gcc-4_9*)
toolchainconf='--extraconfigdir ../config/gcc4_9'
;;
*gcc-5*)
toolchainconf='--extraconfigdir ../config/gcc5'
;;
*gcc-6*)
toolchainconf='--extraconfigdir ../config/gcc6'
;;
*gcc-7*)
toolchainconf='--extraconfigdir ../config/gcc7'
;;
*)
toolchainconf='--extraconfigdir ../config/latest-rel'
;;
esac
cat <<EOF > gcc_orig_parameters
override=$toolchainconf gcc=gcc.git@$gcc_orig_rev
log_name=tcwg-backport-$gcc_orig_rev/$abe_rev/@@host@@.\$target
rebuild=${rebuild}
dont_fail=true
log_server=$log_server
target_list=$target_list
abe_branch=$abe_rev
scripts_branch=$scripts_branch
displaytag=backport-ref-${GERRIT_CHANGE_NUMBER}
dryrun=$dryrun
EOF
cat <<EOF > gcc_patch_parameters
override=$toolchainconf gcc=gcc.git@$gcc_patch_rev
log_name=tcwg-backport-$gcc_patch_rev/$abe_rev/@@host@@.\$target
rebuild=${rebuild}
dont_fail=true
log_server=$log_server
target_list=$target_list
abe_branch=$abe_rev
scripts_branch=$scripts_branch
displaytag=backport-patch-${GERRIT_CHANGE_NUMBER}
dryrun=$dryrun
EOF
cat <<EOF > compare_results_parameters
ref_logs=tcwg-backport-$gcc_orig_rev/$abe_rev
new_logs=tcwg-backport-$gcc_patch_rev/$abe_rev
target_list=$target_list
log_server=$log_server
dryrun=$dryrun
EOF
- conditional-step:
condition-kind: file-exists
condition-filename: gcc_orig_parameters
steps:
- trigger-builds:
- project: tcwg-buildfarm
parameter-factories:
- factory: filebuild
file-pattern: gcc_*_parameters
block: true
- conditional-step:
condition-kind: file-exists
condition-filename: gcc_orig_parameters
steps:
- trigger-builds:
- project: tcwg-compare-results
property-file: compare_results_parameters
block: true
|