Deploy script should send an e-mail

RESOLVED WORKSFORME

Status

Socorro
Infra
RESOLVED WORKSFORME
6 years ago
3 years ago

People

(Reporter: lonnen, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
We've talked about adding this to stage, but I think it would also be valuable to add to production deployments as well. Our deploy process should send an e-mail automatically to the socorro-dev mailing list. Keep the message simple and filterable, i.e. `{tag} pushed to {stage|prod}`
(In reply to Chris Lonnen :lonnen from comment #0)
> We've talked about adding this to stage, but I think it would also be
> valuable to add to production deployments as well. Our deploy process should
> send an e-mail automatically to the socorro-dev mailing list. Keep the
> message simple and filterable, i.e. `{tag} pushed to {stage|prod}`

The way this works right now is that there is an install script in the private puppet (svn) repo at /data/bin/update-socorro.sh which takes an URL to a socorro.tar.gz as the only argument.

crash-stats dev runs this from cron (with the URL /data/bin/update-socorro.sh https://ci.mozilla.org/job/socorro-master/lastSuccessfulBuild/artifact/socorro.tar.gz) and stage/prod are installed by IT (running the same script, but with a specific build number instead of the "lastSuccessfulBuild" symlink).

The last thing this script does is:

echo "Socorro build installed successfully!"
echo "Downloaded from ${URL}"
echo "Checksum: ${NEW_CSUM}"
echo "Backed up original to /data/socorro.${DATE}"

So the sysadmin or cronmail sees this but no one else does.

We can easily have the script send an email. I agree that we should keep it simple/filterable.
(In reply to Chris Lonnen :lonnen from comment #0)
> We've talked about adding this to stage, but I think it would also be
> valuable to add to production deployments as well. Our deploy process should
> send an e-mail automatically to the socorro-dev mailing list. Keep the
> message simple and filterable, i.e. `{tag} pushed to {stage|prod}`

The tag is actually hard to get to (since we don't wait for a tag to start the build, and we generally in fact tag the chosen git revision after the fact). dev and stage builds won't have a tag at all.

I think the most useful thing here would be to have the jenkins build number, although with dev/stage auto-installing we won't have access to this (we could just say "latest build" in those cases though), and have the git revision inside the email (along with md5sum of the socorro.tar.gz and anything else we think is useful)
(Reporter)

Comment 3

6 years ago
Forget the tag then. I think we'll get most of the benefit with the sha and some way to determine with e-mail filters if its deploying to stage or prod. The url should be sufficient for that.
(Assignee)

Updated

6 years ago
Component: Socorro → General
Product: Webtools → Socorro
(Reporter)

Comment 4

6 years ago
Created attachment 616233 [details] [diff] [review]
Candidate solution?

I wrote up a candidate patch against the socorro-settings repo.
Assignee: nobody → chris.lonnen
Status: NEW → ASSIGNED
(Reporter)

Comment 5

6 years ago
moving to infra and \cc'ing ops for feedback.
Assignee: chris.lonnen → nobody
Component: General → Infra
QA Contact: socorro → infra
(Reporter)

Comment 6

3 years ago
deploys are triggered by tags which send a notification to watchers
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.