Skip to content

Commit

Permalink
Add configurable from email address
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuxton committed Jan 5, 2014
1 parent b256b30 commit d4d4303
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 32 deletions.
1 change: 1 addition & 0 deletions app/cabot_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

import os

WWW_HTTP_HOST = os.environ.get('CABOT_FROM_EMAIL')
GRAPHITE_API = os.environ.get('GRAPHITE_API')
GRAPHITE_USER = os.environ.get('GRAPHITE_USER')
GRAPHITE_PASS = os.environ.get('GRAPHITE_PASS')
Expand Down
2 changes: 1 addition & 1 deletion app/cabotapp/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def send_email_alert(service, users, duty_officers):
send_mail(
subject=subject,
message=t.render(c),
from_email='Arachnys Cabot <[email protected]>',
from_email='Cabot <%s>' % settings.CABOT_FROM_EMAIL,
recipient_list=emails,
)

Expand Down
62 changes: 31 additions & 31 deletions app/cabotapp/tests/fixtures/jenkins_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,101 +4,101 @@

],
"description" : "",
"displayName" : "cron-run-engine-pingchecks",
"displayName" : "some-job",
"displayNameOrNull" : null,
"name" : "cron-run-engine-pingchecks",
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/",
"name" : "some-job",
"url" : "https://jenkins.example.com/job/some-job/",
"buildable" : true,
"builds" : [
{
"number" : 176,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/176/"
"url" : "https://jenkins.example.com/job/some-job/176/"
},
{
"number" : 175,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/175/"
"url" : "https://jenkins.example.com/job/some-job/175/"
},
{
"number" : 174,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/174/"
"url" : "https://jenkins.example.com/job/some-job/174/"
},
{
"number" : 173,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/173/"
"url" : "https://jenkins.example.com/job/some-job/173/"
},
{
"number" : 172,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/172/"
"url" : "https://jenkins.example.com/job/some-job/172/"
},
{
"number" : 171,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/171/"
"url" : "https://jenkins.example.com/job/some-job/171/"
},
{
"number" : 170,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/170/"
"url" : "https://jenkins.example.com/job/some-job/170/"
},
{
"number" : 169,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/169/"
"url" : "https://jenkins.example.com/job/some-job/169/"
},
{
"number" : 168,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/168/"
"url" : "https://jenkins.example.com/job/some-job/168/"
},
{
"number" : 167,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/167/"
"url" : "https://jenkins.example.com/job/some-job/167/"
},
{
"number" : 166,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/166/"
"url" : "https://jenkins.example.com/job/some-job/166/"
},
{
"number" : 165,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/165/"
"url" : "https://jenkins.example.com/job/some-job/165/"
},
{
"number" : 164,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/164/"
"url" : "https://jenkins.example.com/job/some-job/164/"
},
{
"number" : 163,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/163/"
"url" : "https://jenkins.example.com/job/some-job/163/"
},
{
"number" : 162,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/162/"
"url" : "https://jenkins.example.com/job/some-job/162/"
},
{
"number" : 161,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/161/"
"url" : "https://jenkins.example.com/job/some-job/161/"
},
{
"number" : 160,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/160/"
"url" : "https://jenkins.example.com/job/some-job/160/"
},
{
"number" : 159,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/159/"
"url" : "https://jenkins.example.com/job/some-job/159/"
},
{
"number" : 158,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/158/"
"url" : "https://jenkins.example.com/job/some-job/158/"
},
{
"number" : 157,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/157/"
"url" : "https://jenkins.example.com/job/some-job/157/"
},
{
"number" : 156,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/156/"
"url" : "https://jenkins.example.com/job/some-job/156/"
}
],
"color" : "aborted_anime",
"firstBuild" : {
"number" : 156,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/156/"
"url" : "https://jenkins.example.com/job/some-job/156/"
},
"healthReport" : [
{
Expand All @@ -111,28 +111,28 @@
"keepDependencies" : false,
"lastBuild" : {
"number" : 176,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/176/"
"url" : "https://jenkins.example.com/job/some-job/176/"
},
"lastCompletedBuild" : {
"number" : 175,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/175/"
"url" : "https://jenkins.example.com/job/some-job/175/"
},
"lastFailedBuild" : {
"number" : 172,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/172/"
"url" : "https://jenkins.example.com/job/some-job/172/"
},
"lastStableBuild" : {
"number" : 171,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/171/"
"url" : "https://jenkins.example.com/job/some-job/171/"
},
"lastSuccessfulBuild" : {
"number" : 171,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/171/"
"url" : "https://jenkins.example.com/job/some-job/171/"
},
"lastUnstableBuild" : null,
"lastUnsuccessfulBuild" : {
"number" : 175,
"url" : "https://jenkinson.arachnys.com/job/cron-run-engine-pingchecks/175/"
"url" : "https://jenkins.example.com/job/some-job/175/"
},
"nextBuildNumber" : 177,
"property" : [
Expand Down
1 change: 1 addition & 0 deletions conf/development.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PORT=5001
# You shouldn't need to change anything above this line
# Django admin email
[email protected]
[email protected]

# URL of calendar to synchronise rota with
CALENDAR_ICAL_URL=http://www.google.com/calendar/ical/example.ics
Expand Down
1 change: 1 addition & 0 deletions conf/production.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ VENV=/home/ubuntu/venv
# You shouldn't need to change anything above this line
# Django admin email
[email protected]
[email protected]

# URL of calendar to synchronise rota with
CALENDAR_ICAL_URL=http://www.google.com/calendar/ical/example.ics
Expand Down

0 comments on commit d4d4303

Please sign in to comment.