blob: cd2e8640dae84c8d982e65fd2c235cc28785acff [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
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +070015 parameters:
16 - string:
17 name: GERRIT_HOST
18 default: 'review.trustedfirmware.org'
19 - string:
20 name: GERRIT_PROJECT
21 default: 'TF-A/trusted-firmware-a'
22 description: |
23 Git project to build (also set by Gerrit trigger)
24 - string:
25 name: GERRIT_BRANCH
26 default: 'integration'
27 description: |
28 Git branch to build (also set by Gerrit trigger)
29 - string:
30 name: GERRIT_REFSPEC
31 default: ''
32 triggers:
33 - gerrit:
34 silent: true
35 server-name: 'review.trustedfirmware.org'
36 projects:
37 - branches:
38 - branch-compare-type: PLAIN
Saheer Babufd524222025-01-21 23:42:41 +000039 branch-pattern: openci-migration
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +070040 project-compare-type: PLAIN
Saheer Babufd524222025-01-21 23:42:41 +000041 project-pattern: 'next/TF-A/trusted-firmware-a'
Paul Sokolovskyb943e2c2023-02-28 20:19:54 +070042 trigger-on:
43 - patchset-created-event
44 wrappers:
45 - timestamps
46 - timeout:
47 timeout: 30
48 fail: true
49 - credentials-binding:
50 - ssh-user-private-key:
51 credential-id: TFA_CI_BOT_USER_SSH_KEY
52 key-file-variable: CI_BOT_KEY
53 username-variable: CI_BOT_USERNAME
54 passphrase-variable: ''
55 builders:
56 - shell: |
57 #!/bin/bash
58 set -ex
59 env | grep GERRIT
60
61 sudo apt-get update -q
62 sudo apt-get install -y -q python3-git
63 pip install unidiff>=0.7.4
64
65 START_PATH=$(pwd)
66 LTS_TMP_DIR=$(mktemp -d -p ./)
67 cd $LTS_TMP_DIR
68
69 git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
70
71 TFA_TMP_DIR=$(mktemp -d -p ./)
72 cd $TFA_TMP_DIR
73 git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} -b ${GERRIT_BRANCH} ./
74 if [ -n "${GERRIT_REFSPEC}" ]; then
75 (
76 # cd $(basename ${GERRIT_PROJECT})
77 git fetch https://${GERRIT_HOST}/${GERRIT_PROJECT} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
78 git checkout -b to_check
79 )
80 fi
81
82 LTS_REPO_PATH=$(pwd)
83 # (cd $(basename ${GERRIT_PROJECT}); git log --oneline -n5)
84 cd -
85
86 python3 tf-a-ci-scripts/lts/lts-triage.py --repo $LTS_REPO_PATH --email_path $START_PATH/email.txt --debug
87
88 cd $START_PATH
89 rm -rf $LTS_TMP_DIR
Saheer Babuf545d7a2025-02-11 10:11:10 +000090 # publishers:
91 # - conditional-publisher:
92 # - condition-kind: file-exists
93 # on-evaluation-failure: dont-run
94 # condition-filename: email.txt
95 # condition-basedir: workspace
96 # action:
97 # - email-ext:
98 # always: true
99 # subject: "TF-A LTS Triage Email"
100 # body: '${FILE, path="email.txt"}'
101 # recipients: okash@google.com, bipin.ravi@arm.com, vwadekar@nvidia.com, joanna.farley@arm.com, lauren.wehrmeister@arm.com palmer@google.com