blob: 750ffd722a00e6f45f72502cfc86810a571b802a [file] [log] [blame]
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +07001- job:
2 name: tf-a-lts-triage
Paul Sokolovskye81da1f2023-08-07 00:28:18 +03003 node: docker-amd64-tf-a-jammy
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +07004 project-type: freestyle
5 concurrent: true
Arthur Shea0bacdd2024-04-11 13:28:45 -07006 disabled: true
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +07007 defaults: global
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Paul Sokolovsky7aaf9fe2023-08-07 00:08:47 +03009 Job which triages incoming TF-A patches for suitability for LTS branch (https://linaro.atlassian.net/browse/TFC-395)
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +070010 properties:
11 - build-discarder:
12 days-to-keep: 45
13 num-to-keep: 200
14 artifact-num-to-keep: 100
15 - authorization:
16 !include: authorization.yaml.inc
17 parameters:
18 - string:
19 name: GERRIT_HOST
20 default: 'review.trustedfirmware.org'
21 - string:
22 name: GERRIT_PROJECT
23 default: 'TF-A/trusted-firmware-a'
24 description: |
25 Git project to build (also set by Gerrit trigger)
26 - string:
27 name: GERRIT_BRANCH
28 default: 'integration'
29 description: |
30 Git branch to build (also set by Gerrit trigger)
31 - string:
32 name: GERRIT_REFSPEC
33 default: ''
34 triggers:
35 - gerrit:
36 silent: true
37 server-name: 'review.trustedfirmware.org'
38 projects:
39 - branches:
40 - branch-compare-type: PLAIN
41 branch-pattern: integration
42 project-compare-type: PLAIN
43 project-pattern: 'TF-A/trusted-firmware-a'
44 trigger-on:
45 - patchset-created-event
46 wrappers:
47 - timestamps
48 - timeout:
49 timeout: 30
50 fail: true
51 - credentials-binding:
52 - ssh-user-private-key:
53 credential-id: TFA_CI_BOT_USER_SSH_KEY
54 key-file-variable: CI_BOT_KEY
55 username-variable: CI_BOT_USERNAME
56 passphrase-variable: ''
57 builders:
58 - shell: |
59 #!/bin/bash
60 set -ex
61 env | grep GERRIT
62
63 sudo apt-get update -q
64 sudo apt-get install -y -q python3-git
65 pip install unidiff>=0.7.4
66
67 START_PATH=$(pwd)
68 LTS_TMP_DIR=$(mktemp -d -p ./)
69 cd $LTS_TMP_DIR
70
71 git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
72
73 TFA_TMP_DIR=$(mktemp -d -p ./)
74 cd $TFA_TMP_DIR
75 git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} -b ${GERRIT_BRANCH} ./
76 if [ -n "${GERRIT_REFSPEC}" ]; then
77 (
78 # cd $(basename ${GERRIT_PROJECT})
79 git fetch https://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
80 git checkout -b to_check
81 )
82 fi
83
84 LTS_REPO_PATH=$(pwd)
85 # (cd $(basename ${GERRIT_PROJECT}); git log --oneline -n5)
86 cd -
87
88 python3 tf-a-ci-scripts/lts/lts-triage.py --repo $LTS_REPO_PATH --email_path $START_PATH/email.txt --debug
89
90 cd $START_PATH
91 rm -rf $LTS_TMP_DIR
92 publishers:
93 - conditional-publisher:
94 - condition-kind: file-exists
95 on-evaluation-failure: dont-run
96 condition-filename: email.txt
97 condition-basedir: workspace
98 action:
99 - email-ext:
100 always: true
101 subject: "TF-A LTS Triage Email"
102 body: '${FILE, path="email.txt"}'
Arthur Shee02544d2024-10-07 14:18:14 -0700103 recipients: okash@google.com, paul.sokolovsky@linaro.org, bipin.ravi@arm.com, vwadekar@nvidia.com, joanna.farley@arm.com, lauren.wehrmeister@arm.com palmer@google.com