blob: a19070dd0741323dede40bea809e87dbf23b69d5 (
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
|
# Auto generated by ./tcwg/generate-yamlfiles.sh from tcwg-report-stale-rr-jobs.yaml.in and tcwg-report-stale-rr-jobs/tcwg-report-stale-rr-jobs.def. Do not edit.
#BEGIN: tcwg/default.yaml.inc
# -*- mode: Yaml -*-
- property:
name: default-properties
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
everyone-flat:
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
- scm:
name: jenkins-scripts-master
scm:
- git:
url: https://git.linaro.org/toolchain/jenkins-scripts.git
refspec: +refs/heads/master:refs/remotes/origin/master
branches:
- master
basedir: jenkins-scripts
skip-tag: true
reference-repo: /home/tcwg-buildslave/snapshots-ref/jenkins-scripts.git
wipe-workspace: false
clean:
before: true
prune: true
#END: tcwg/default.yaml.inc
- job:
name: tcwg-report-stale-rr-jobs
project-type: freestyle
defaults: global
properties:
- default-properties
parameters:
- string:
name: days
default: 8
description: 'List jobs with no successful run in DAYS'
disabled: false
node: tcwg-coordinator
concurrent: false
display-name: 'TCWG CCC Report Stale RR Jobs'
scm:
- jenkins-scripts-master
triggers:
- timed: '@daily'
wrappers:
- timeout:
timeout: 300
- timestamps
- ssh-agent-credentials:
# tcwg-buildslave user id
users:
- 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
builders:
- shell: |
#!/bin/bash
set -euf -o pipefail
set -x
rm -rf artifacts
mkdir artifacts
bash -x ./jenkins-scripts/tcwg-report-stale-rr-jobs.sh --days "$days" \
--output artifacts/stale-jobs.log
bash -x ./jenkins-scripts/tcwg-report-stale-rr-jobs.sh \
--classify artifacts/stale-jobs.log \
--output artifacts/stale-jobs-analysis.log || true
n_lines=$(cat artifacts/stale-jobs.log | wc -l)
./jenkins-scripts/tcwg-report-ci-status.sh > artifacts/ci-status.log
if [ x"$n_lines" != x"0" ]; then
(
echo "Jobs with no new results in $days days ($n_lines entries):"
cat artifacts/ci-status.log
cat artifacts/stale-jobs-analysis.log
cat artifacts/stale-jobs.log
) > artifacts/email-body.txt
exit 1
fi
publishers:
- archive:
artifacts: 'artifacts/**'
latest-only: false
- email-ext:
recipients: 'maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org'
content-type: text
body: |
${FILE,path="artifacts/email-body.txt"}
failure: true
aborted: true
# checksum: a020d23dcdda834e74fb3a69446e7e1e
|