This repository has been archived by the owner on Apr 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beaker-dev-selftest.yaml
55 lines (51 loc) · 1.97 KB
/
beaker-dev-selftest.yaml
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
- job:
name: beaker-dev-selftest
description: |
Runs bkr workflow-selftest against the Beaker devel environment, to
check that the currently deployed Beaker release works properly.
node: fedora
parameters:
- string:
name: WHITEBOARD
default: "self-test for <unspecified purpose>"
description: |
Job whiteboard to be used when submitting the self-test job to
Beaker. If this is for acceptance testing for a Beaker release,
use the whiteboard value to indicate that.
scm:
- git:
url: git://git.beaker-project.org/beaker-workflow-selftest
branches:
- origin/master
clean:
before: true
wipe-workspace: false
skip-tag: true
publishers:
- report-failures
- archive:
artifacts: beaker/**
builders:
- shell: |
cat >client.conf <<EOF
HUB_URL="https://beaker-devel.app.eng.bos.redhat.com"
AUTH_METHOD="krbv"
EOF
export BEAKER_CLIENT_CONF=client.conf
k5start -U -f $JENKINS_KEYTAB
python setup.py egg_info
export PYTHONPATH=src
workflow_output=$(bkr workflow-selftest --whiteboard "$WHITEBOARD" --retention-tag audit --product '[internal]')
jobid=$(echo $workflow_output | awk -F\' '{print $2}')
bkr job-watch $jobid || :
mkdir -p beaker/$jobid
bkr job-results --prettyxml $jobid >beaker/$jobid/results.xml
jobresult=$(xmlstarlet sel -t -v 'concat(/job/@status, "/", /job/@result)' <beaker/$jobid/results.xml)
if [[ "$jobresult" != "Completed/Pass" ]] ; then
exit 1
fi
wrappers:
- credentials-binding:
- file:
credential-id: "1fc5282d-0e61-4736-ace4-9ff23b065636"
variable: JENKINS_KEYTAB