Skip to content

Commit 3e57b67

Browse files
Release_251106_PR
Release 2025 11 06 Retention Policy PRD
2 parents baffdb0 + c5b7d94 commit 3e57b67

File tree

5 files changed

+350
-0
lines changed

5 files changed

+350
-0
lines changed

lib/travis/addons/gdpr/mailer/gdpr_mailer.rb

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,42 @@ def purge(receivers, request_date)
2424
mail(from: travis_email, to: receivers, subject: 'Your data was purged', template_path: 'gdpr_mailer')
2525
end
2626

27+
# Retention policy notifications
28+
29+
def data_retention_notice(receivers, owner, retention)
30+
@owner = owner
31+
@retention = retention
32+
mail(
33+
from: travis_email,
34+
to: receivers,
35+
subject: "Notice: Data Stored at Travis CI Older Than #{retention[:months]} Months",
36+
template_path: 'gdpr_mailer'
37+
)
38+
end
39+
40+
def upcoming_data_deletion_notice(receivers, owner, retention)
41+
@owner = owner
42+
@retention = retention
43+
days = (retention[:days_until_deletion]).to_i
44+
mail(
45+
from: travis_email,
46+
to: receivers,
47+
subject: "Reminder: Scheduled Deletion of Data Older Than #{retention[:months]} Months in #{days} Days",
48+
template_path: 'gdpr_mailer'
49+
)
50+
end
51+
52+
def data_deletion_confirmation(receivers, owner, retention) # Comes from travis-gdpr
53+
@owner = owner
54+
@retention = retention
55+
mail(
56+
from: travis_email,
57+
to: receivers,
58+
subject: "Confirmation: Data Older Than #{retention[:months]} Months Has Been Removed",
59+
template_path: 'gdpr_mailer'
60+
)
61+
end
62+
2763
private
2864

2965
def travis_email
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<style type="text/css" media="screen">
9+
body { min-width: 100%; height: 100%; margin: 0; padding: 0; }
10+
body, td { font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
11+
#travis-ci-email-container { height: 100%; width: 100%; padding: 30px; text-align: center; color: #333; line-height: 1.4; background-color: #F4F5F9; background-image: url("#{Travis.config.s3.url}/billing-background.png"); background-size: 600px 600px; }
12+
#email-central-container { padding-bottom: 20px; width: 500px; }
13+
#email-content-container { padding: 6% 7% 5% 7%; background-color: #FFFFFF; text-align: left; }
14+
#email-content-container p { font-size: 16px; margin: 0 0 10px 0; }
15+
#travis-logo-img-container { border-bottom: 2px solid #e5e7e9; padding-bottom: 4.545%; text-align: center; }
16+
#travis-logo-img { width: 42%; }
17+
h2 { font-size: 24px; font-weight: 600; margin: 10.227% 0 6.818% 0; text-align: center; }
18+
ul { padding-left: 18px; }
19+
#closing-message-section { padding: 10.227% 0 1.136% 0; text-align: center; }
20+
#travis-ci-email-footer-container { padding: 13% 7% 5% 7%; }
21+
#questions-section { font-size: 18px; color: #0068FF; padding-bottom: 10.227%; text-align: center; }
22+
#questions-section a { color: #0068FF; }
23+
#email-footer-section { font-size: 11px; color: #9EA3A8; text-align: center; padding-top: 0px; margin: 0px; }
24+
#email-footer-section p { margin: 0px; }
25+
</style>
26+
</head>
27+
<body class="not-wide" style="min-width: 100%;height: 100%;margin: 0;padding: 0;font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
28+
<table id="travis-ci-email-container" align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
29+
<tr>
30+
<td align="center" valign="top">
31+
<table id="email-central-container" border="0" cellpadding="0" cellspacing="0">
32+
<tr>
33+
<td>
34+
<table id="email-content-container" border="0" cellpadding="0" cellspacing="0">
35+
<tr>
36+
<td id="travis-logo-img-container">
37+
<img src="https://s3.amazonaws.com/travis-email-assets/travis_ci_logo.png" alt="Travis CI Logo" id="travis-logo-img">
38+
</td>
39+
</tr>
40+
<tr>
41+
<td>
42+
<h2>Confirmation: Data Older Than <%= @retention[:months] %> Months Has Been Removed</h2>
43+
</td>
44+
</tr>
45+
<tr>
46+
<td>
47+
<p>Hello <%= @owner[:name] %>,</p>
48+
<p>This is an automated confirmation from Travis CI.</p>
49+
<p>As part of our storage retention policy, the following types of data older than <%= @retention[:months] %> months have been permanently removed from your account:</p>
50+
<ul>
51+
<li>Cached artifacts</li>
52+
<li>Build logs</li>
53+
<li>Customized images</li>
54+
</ul>
55+
<p>
56+
No further action is required on your part.
57+
<br>
58+
If you have questions about this removal or our retention policy, please refer to our
59+
<a href="https://docs.travis-ci.com" style="color: #0068FF;">documentation</a> or contact our support team.
60+
</p>
61+
</td>
62+
</tr>
63+
<tr>
64+
<td id="closing-message-section" valign="top">
65+
<p>
66+
Thank you for your understanding,
67+
<br>
68+
Travis CI Support Team
69+
</p>
70+
</td>
71+
</tr>
72+
</table>
73+
<table id="travis-ci-email-footer-container" border="0" cellpadding="0" cellspacing="0">
74+
<tr>
75+
<td id="questions-section" align="center" valign="top">
76+
<span>Have any questions?</span>
77+
<span>
78+
<a href="mailto:support@travis-ci.com">We&rsquo;re here to help.</a>
79+
</span>
80+
</td>
81+
</tr>
82+
<tr>
83+
<td id="travis-ci-footer-logo-section" style="text-align: center;padding-bottom: 7.954%;">
84+
<%= link_to(image_tag("#{Travis.config.s3.url}/TravisCI-Logo-BW.png", alt: 'black and white travis ci logo'), 'https://travis-ci.com')%>
85+
</td>
86+
</tr>
87+
<tr>
88+
<td id="email-footer-section">
89+
<p>
90+
Travis CI GmbH, Bonner Straße 12, 51379 Leverkusen, Germany | GF/CEO: Randy Jacops |
91+
<span>Contact: <%= link_to('contact@travis-ci.com', 'mailto:contact@travis-ci.com', style: 'color: #9EA3A8')%> | Amtsgericht Charlottenburg, Berlin, HRB 108397 | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648</span>
92+
</p>
93+
</td>
94+
</tr>
95+
</table>
96+
</td>
97+
</tr>
98+
</table>
99+
</td>
100+
</tr>
101+
</table>
102+
</body>
103+
</html>
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<style type="text/css" media="screen">
9+
body { min-width: 100%; height: 100%; margin: 0; padding: 0; }
10+
body, td { font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
11+
#travis-ci-email-container { height: 100%; width: 100%; padding: 30px; text-align: center; color: #333; line-height: 1.4; background-color: #F4F5F9; background-image: url("#{Travis.config.s3.url}/billing-background.png"); background-size: 600px 600px; }
12+
#email-central-container { padding-bottom: 20px; width: 500px; }
13+
#email-content-container { padding: 6% 7% 5% 7%; background-color: #FFFFFF; text-align: left; }
14+
#email-content-container p { font-size: 16px; margin: 0 0 10px 0; }
15+
#travis-logo-img-container { border-bottom: 2px solid #e5e7e9; padding-bottom: 4.545%; text-align: center; }
16+
#travis-logo-img { width: 42%; }
17+
h2 { font-size: 24px; font-weight: 600; margin: 10.227% 0 6.818% 0; text-align: center; }
18+
ul { padding-left: 18px; }
19+
#closing-message-section { padding: 10.227% 0 1.136% 0; text-align: center; }
20+
#travis-ci-email-footer-container { padding: 13% 7% 5% 7%; }
21+
#questions-section { font-size: 18px; color: #0068FF; padding-bottom: 10.227%; text-align: center; }
22+
#questions-section a { color: #0068FF; }
23+
#email-footer-section { font-size: 11px; color: #9EA3A8; text-align: center; padding-top: 0px; margin: 0px; }
24+
#email-footer-section p { margin: 0px; }
25+
</style>
26+
</head>
27+
<body class="not-wide" style="min-width: 100%;height: 100%;margin: 0;padding: 0;font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
28+
<table id="travis-ci-email-container" align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
29+
<tr>
30+
<td align="center" valign="top">
31+
<table id="email-central-container" border="0" cellpadding="0" cellspacing="0">
32+
<tr>
33+
<td>
34+
<table id="email-content-container" border="0" cellpadding="0" cellspacing="0">
35+
<tr>
36+
<td id="travis-logo-img-container">
37+
<img src="https://s3.amazonaws.com/travis-email-assets/travis_ci_logo.png" alt="Travis CI Logo" id="travis-logo-img">
38+
</td>
39+
</tr>
40+
<tr>
41+
<td>
42+
<h2>Notice: Data Stored at Travis CI Older Than <%= @retention[:months] %> Months</h2>
43+
</td>
44+
</tr>
45+
<tr>
46+
<td>
47+
<p>Hello <%= @owner[:name] %>,</p>
48+
<p>This is an automated notification from Travis CI.</p>
49+
<p>We have detected that some of your stored data is older than <%= @retention[:months] %> months. This may include (but is not limited to):</p>
50+
<ul>
51+
<li>Cached artifacts</li>
52+
<li>Build logs</li>
53+
<li>Customized images</li>
54+
</ul>
55+
<p>Please review and, if necessary, back up or remove this data to ensure continued compliance with storage policies and to free up space for future.</p>
56+
<p>If no action is taken, older data may be subject to automatic removal in accordance with our retention policy (within next <%= @retention[:days_until_deletion] %> days).</p>
57+
<p>
58+
For details on managing stored data, please refer to our <a href="https://docs.travis-ci.com" style="color: #0068FF;">documentation</a>.
59+
</p>
60+
</td>
61+
</tr>
62+
<tr>
63+
<td id="closing-message-section" valign="top">
64+
<p>
65+
Thank you for your attention,
66+
<br>
67+
Travis CI Support Team
68+
</p>
69+
</td>
70+
</tr>
71+
</table>
72+
<table id="travis-ci-email-footer-container" border="0" cellpadding="0" cellspacing="0">
73+
<tr>
74+
<td id="questions-section" align="center" valign="top">
75+
<span>Have any questions?</span>
76+
<span>
77+
<a href="mailto:support@travis-ci.com">We&rsquo;re here to help.</a>
78+
</span>
79+
</td>
80+
</tr>
81+
<tr>
82+
<td id="travis-ci-footer-logo-section" style="text-align: center;padding-bottom: 7.954%;">
83+
<%= link_to(image_tag("#{Travis.config.s3.url}/TravisCI-Logo-BW.png", alt: 'black and white travis ci logo'), 'https://travis-ci.com')%>
84+
</td>
85+
</tr>
86+
<tr>
87+
<td id="email-footer-section">
88+
<p>
89+
Travis CI GmbH, Bonner Straße 12, 51379 Leverkusen, Germany | GF/CEO: Randy Jacops |
90+
<span>Contact: <%= link_to('contact@travis-ci.com', 'mailto:contact@travis-ci.com', style: 'color: #9EA3A8')%> | Amtsgericht Charlottenburg, Berlin, HRB 108397 | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648</span>
91+
</p>
92+
</td>
93+
</tr>
94+
</table>
95+
</td>
96+
</tr>
97+
</table>
98+
</td>
99+
</tr>
100+
</table>
101+
</body>
102+
</html>
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<style type="text/css" media="screen">
9+
body { min-width: 100%; height: 100%; margin: 0; padding: 0; }
10+
body, td { font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
11+
#travis-ci-email-container { height: 100%; width: 100%; padding: 30px; text-align: center; color: #333; line-height: 1.4; background-color: #F4F5F9; background-image: url("#{Travis.config.s3.url}/billing-background.png"); background-size: 600px 600px; }
12+
#email-central-container { padding-bottom: 20px; width: 500px; }
13+
#email-content-container { padding: 6% 7% 5% 7%; background-color: #FFFFFF; text-align: left; }
14+
#email-content-container p { font-size: 16px; margin: 0 0 10px 0; }
15+
#travis-logo-img-container { border-bottom: 2px solid #e5e7e9; padding-bottom: 4.545%; text-align: center; }
16+
#travis-logo-img { width: 42%; }
17+
h2 { font-size: 24px; font-weight: 600; margin: 10.227% 0 6.818% 0; text-align: center; }
18+
ul { padding-left: 18px; }
19+
#closing-message-section { padding: 10.227% 0 1.136% 0; text-align: center; }
20+
#travis-ci-email-footer-container { padding: 13% 7% 5% 7%; }
21+
#questions-section { font-size: 18px; color: #0068FF; padding-bottom: 10.227%; text-align: center; }
22+
#questions-section a { color: #0068FF; }
23+
#email-footer-section { font-size: 11px; color: #9EA3A8; text-align: center; padding-top: 0px; margin: 0px; }
24+
#email-footer-section p { margin: 0px; }
25+
</style>
26+
</head>
27+
<body class="not-wide" style="min-width: 100%;height: 100%;margin: 0;padding: 0;font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;">
28+
<table id="travis-ci-email-container" align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
29+
<tr>
30+
<td align="center" valign="top">
31+
<table id="email-central-container" border="0" cellpadding="0" cellspacing="0">
32+
<tr>
33+
<td>
34+
<table id="email-content-container" border="0" cellpadding="0" cellspacing="0">
35+
<tr>
36+
<td id="travis-logo-img-container">
37+
<img src="https://s3.amazonaws.com/travis-email-assets/travis_ci_logo.png" alt="Travis CI Logo" id="travis-logo-img">
38+
</td>
39+
</tr>
40+
<tr>
41+
<td>
42+
<% days = (@retention[:days_until_deletion]).to_i %>
43+
<h2>Reminder: Scheduled Deletion of Data Older Than <%= @retention[:months] %> Months in <%= days %> Days</h2>
44+
</td>
45+
</tr>
46+
<tr>
47+
<td>
48+
<p>Hello <%= @owner[:name] %>,</p>
49+
<p>This is an automated reminder from Travis CI.</p>
50+
<% days_body_label = days == 1 ? 'day' : 'days' %>
51+
<p>Some of your stored data is older than <%= @retention[:months] %> months and is scheduled for automatic deletion in <%= days %> <%= days_body_label %>. This may include (but is not limited to):</p>
52+
<ul>
53+
<li>Cached artifacts</li>
54+
<li>Build logs</li>
55+
<li>Customized images</li>
56+
</ul>
57+
<p>If you wish to retain this data, please back it up or update it before the scheduled removal date.</p>
58+
<p>
59+
For guidance on managing stored data, please see our <a href="https://docs.travis-ci.com" style="color: #0068FF;">documentation</a>.
60+
</p>
61+
</td>
62+
</tr>
63+
<tr>
64+
<td id="closing-message-section" valign="top">
65+
<p>
66+
Thank you for helping us maintain a clean and efficient storage environment,
67+
<br>
68+
Travis CI Support Team
69+
</p>
70+
</td>
71+
</tr>
72+
</table>
73+
<table id="travis-ci-email-footer-container" border="0" cellpadding="0" cellspacing="0">
74+
<tr>
75+
<td id="questions-section" align="center" valign="top">
76+
<span>Have any questions?</span>
77+
<span>
78+
<a href="mailto:support@travis-ci.com">We&rsquo;re here to help.</a>
79+
</span>
80+
</td>
81+
</tr>
82+
<tr>
83+
<td id="travis-ci-footer-logo-section" style="text-align: center;padding-bottom: 7.954%;">
84+
<%= link_to(image_tag("#{Travis.config.s3.url}/TravisCI-Logo-BW.png", alt: 'black and white travis ci logo'), 'https://travis-ci.com')%>
85+
</td>
86+
</tr>
87+
<tr>
88+
<td id="email-footer-section">
89+
<p>
90+
Travis CI GmbH, Bonner Straße 12, 51379 Leverkusen, Germany | GF/CEO: Randy Jacops |
91+
<span>Contact: <%= link_to('contact@travis-ci.com', 'mailto:contact@travis-ci.com', style: 'color: #9EA3A8')%> | Amtsgericht Charlottenburg, Berlin, HRB 108397 | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648</span>
92+
</p>
93+
</td>
94+
</tr>
95+
</table>
96+
</td>
97+
</tr>
98+
</table>
99+
</td>
100+
</tr>
101+
</table>
102+
</body>
103+
</html>

lib/travis/addons/gdpr/task.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def send_email
1818
Mailer::GdprMailer.support_export(recipients, params.fetch(:user_name), params.fetch(:url)).deliver
1919
when 'purge'
2020
Mailer::GdprMailer.purge(recipients, params.fetch(:request_date)).deliver
21+
when 'data_retention_notice'
22+
Mailer::GdprMailer.data_retention_notice(recipients, params.fetch(:owner), params.fetch(:retention)).deliver
23+
when 'upcoming_data_deletion_notice'
24+
Mailer::GdprMailer.upcoming_data_deletion_notice(recipients, params.fetch(:owner), params.fetch(:retention)).deliver
25+
when 'data_deletion_confirmation'
26+
Mailer::GdprMailer.data_deletion_confirmation(recipients, params.fetch(:owner), params.fetch(:retention)).deliver
2127
else
2228
raise NoMailType, "#{type} is not a valid email type"
2329
end

0 commit comments

Comments
 (0)