blob: afe7fe41010eff1956c89705ddc358e17b6519db (
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
|
- job:
name: jdk-clean-job
project-type: freestyle
defaults: global
description: |
Clean up the machine after or before other jobs.
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
openjdk-members:
- job-build
- job-cancel
- build-discarder:
num-to-keep: 10
artifact-num-to-keep: 1
disabled: false
node: aarch64-06
display-name: 'OpenJDK - Clean job'
wrappers:
- timestamps
builders:
- shell: |
#!/bin/bash
#set -exu
# Kill all orphaned java processes
ps --no-headers --ppid 1 --format "pid cmd" | tr -s " " | grep java | cut -d " " -f 1 | xargs kill -9
# Kill all jstatd processes. These can accumulate.
killall --verbose -9 jstatd
# Javac jobs can accumulate.
killall --verbose -9 javac
# These can accumulate too.
killall --verbose -9 Xvfb
ps --forest -aux
publishers:
- email:
recipients: 'stuart.monteith@linaro.org'
|