blob: ddbea220868ebb70ba48f66928a3578c993c723d [file] [log] [blame]
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +03001- job:
2 name: tf-a-lts-release-mail
3 node: docker-amd64-tf-a-jammy
4 project-type: freestyle
5 concurrent: true
6 disabled: false
7 defaults: global
Paul Sokolovskyd9f65b52024-10-22 13:50:58 +07008 description: |
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +03009 Render TF-A LTS release email template.
10 properties:
11 - build-discarder:
Paul Sokolovsky898f0312024-01-30 00:06:28 +070012 days-to-keep: 365
13 num-to-keep: 50
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +030014 parameters:
15 - string:
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070016 name: GERRIT_HOST
17 default: 'review.trustedfirmware.org'
18 - string:
19 name: GERRIT_PROJECT
20 default: 'TF-A/trusted-firmware-a'
21 description: |
22 TF-A Git project
23 - string:
24 name: GERRIT_BRANCH
25 default: ''
26 description: |
27 Git branch (e.g. lts-v2.8) to search for the latest tag in case of --latest is used for RELEASE_TAG
28 - string:
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +030029 name: RELEASE_TAG
30 default: '--latest'
31 description: |
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070032 Release git tag, e.g. 'lts-v2.8.10', or '--latest' to get latest tag in GERRIT_BRANCH
33 - bool:
34 name: SANDBOX_RUN
35 default: true
36 description: |
37 Run sandbox simulation of a release. Uncheck this only after
38 running simulation and checking that everything is correct!
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +030039# triggers:
40# - gerrit:
41# silent: true
42# server-name: 'review.trustedfirmware.org'
43# projects:
44# - branches:
45# - branch-compare-type: PLAIN
46# branch-pattern: integration
47# project-compare-type: PLAIN
48# project-pattern: 'TF-A/trusted-firmware-a'
49# trigger-on:
50# - patchset-created-event
51 wrappers:
52 - timestamps
53 - timeout:
54 timeout: 5
55 fail: true
56 builders:
57 - shell: |
58 #!/bin/bash
59 set -ex
60
61 git clone https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070062 ./tf-a-ci-scripts/lts/lts-release-mail.py --url https://${GERRIT_HOST}/${GERRIT_PROJECT} --branch "${GERRIT_BRANCH}" ${RELEASE_TAG} >email.txt
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +030063 awk -F": " '/Subject:/ {print $2}' email.txt >subject.txt
64 # Remove email headers, put in a seperate file.
65 sed '0,/^$/d' email.txt >body.txt
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070066
67 if [ "$SANDBOX_RUN" == "true" ]; then
Govindraj Raja3ceffb02025-06-13 11:28:23 -050068 echo "Bipin.Ravi@arm.com, vwadekar@nvidia.com, yann.gautier@st.com, jidong@google.com, govindraj.raja@arm.com" >recipients.txt
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070069 echo -n "[SANDBOX] " | cat - subject.txt > subject.txt.tmp
70 mv subject.txt.tmp subject.txt
71 else
Arthur She7e4b2ce2025-01-09 22:11:59 -080072 echo "tfa-lts@lists.trustedfirmware.org, tf-a@lists.trustedfirmware.org" >recipients.txt
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070073 fi
74
Paul Sokolovskyf0ecdb52023-11-27 22:30:14 +030075 set +x
76 echo "======================================================================="
77 cat email.txt
78 echo "======================================================================="
79 publishers:
80 - archive:
81 artifacts: email.txt
82 latest-only: false
83 allow-empty: true
84 - conditional-publisher:
85 - condition-kind: file-exists
86 on-evaluation-failure: dont-run
87 condition-filename: email.txt
88 condition-basedir: workspace
89 action:
90 - email-ext:
91 always: true
92 subject: '${FILE, path="subject.txt"}'
93 body: '${FILE, path="body.txt"}'
Paul Sokolovsky633c4d92024-02-28 13:30:14 +070094 recipients: '${FILE, path="recipients.txt"}'