blob: 36146b82c409619e8fabd150c5b82e83da8dd21d (
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
|
- job:
name: tcwg-rr-llvm-kernel-aarch64
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
parameters:
- choice:
name: current_project
choices:
- llvm
- linux
description: 'Project to build'
- string:
name: current_rev
default: master
description: "Git rev of $current_project to build"
- string:
name: base_rev
default: default
description: "Base git rev of $current_project to build, make sense only with %N current_rev; default means tested branch"
- string:
name: baseline
default: last-successful
description: "Baseline to compare against: last-successful, none, or build number"
- string:
name: distro
default: xenial
description: 'Distro image to use'
- string:
name: scripts_branch
default: llvm-kernel-v2
description: 'Scripts revision to use'
disabled: false
node: tcwg-d05_64-build
concurrent: false
display-name: 'TCWG RRv1 LLVM + Linux-next @ AArch64'
scm:
- git:
url: https://git-us.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: false
clean:
before: true
prune: true
wrappers:
- timeout:
timeout: 600
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
builders:
- shell: |
#!/bin/bash
set -e
echo "=== Print out environment for debug purposes ==="
env | grep "GERRIT\|GIT"
echo "=== Environment end ==="
set -x
echo "#$BUILD_NUMBER-$current_project" > build-name
rm -rf prev_artifacts*
case "$baseline" in
last-successful) touch prev_artifacts-last-successful ;;
none) touch prev_artifacts-none ;;
*) touch prev_artifacts-specific-build ;;
esac
- build-name-setter:
name: 'build-name'
file: true
- conditional-step:
condition-kind: file-exists
condition-filename: prev_artifacts-last-successful
steps:
- copyartifact:
project: tcwg-rr-llvm-kernel-aarch64
target: prev_artifacts
optional: true
which-build: last-successful
- conditional-step:
condition-kind: file-exists
condition-filename: prev_artifacts-specific-build
steps:
- copyartifact:
project: tcwg-rr-llvm-kernel-aarch64
target: prev_artifacts
optional: true
which-build: specific-build
build-number: '${ENV,var="baseline"}'
- conditional-step:
condition-kind: file-exists
condition-filename: prev_artifacts-none
steps:
- shell: |
echo "Building without baseline"
- shell: |
#!/bin/bash
set -ex
./jenkins-scripts/docker-run.sh --distro $distro -- \
./jenkins-scripts/tcwg-rr-llvm-kernel.sh \
--mode "jenkins-builder" \
--base_rev "$base_rev" \
--current_project "$current_project" \
--current_rev "$current_rev" \
--verbose true || true
- shell: |
#!/bin/bash
set -ex
if [ -e artifacts/failures ]; then
exit 0
fi
./jenkins-scripts/docker-run.sh --distro $distro -- \
./jenkins-scripts/tcwg-rr-llvm-kernel.sh \
--mode "jenkins-publisher" \
--base_rev "$base_rev" \
--current_project "$current_project" \
--current_rev "$current_rev" \
--verbose true || true
- shell: |
#!/bin/bash
name="#$BUILD_NUMBER-$current_project"
if [ -e artifacts/distance-to-good ]; then
name="$name-G$(cat artifacts/distance-to-good)"
fi
if [ -e artifacts/distance-to-rev ]; then
name="$name-R$(cat artifacts/distance-to-rev)"
fi
if [ -e artifacts/distance-to-tested ]; then
name="$name-T$(cat artifacts/distance-to-tested)"
fi
echo "$name" > build-name
- build-name-setter:
name: 'build-name'
file: true
- conditional-step:
condition-kind: files-match
include-pattern:
- "artifacts/trigger-next-*"
steps:
- trigger-builds:
- project: tcwg-rr-llvm-kernel-aarch64
parameter-factories:
- factory: filebuild
file-pattern: artifacts/trigger-next-*
- conditional-step:
condition-kind: file-exists
condition-filename: artifacts/failures
steps:
- shell: |
#!/bin/bash
exit 1
publishers:
- archive:
artifacts: 'artifacts/**'
latest-only: false
|