servo-vcs-sync: configure overlay to notify via SNS (bug 1379559) r?gps draft
authorbyron jones <glob@mozilla.com>
Mon, 17 Jul 2017 14:50:27 +0800
changeset 11376 e57204f92e3f6fc591b2836185f65188b09ac7ae
parent 11375 e0ab42a3d9215dc282b55cb11238c05abbc66eba
push id1733
push userbjones@mozilla.com
push dateWed, 19 Jul 2017 07:17:46 +0000
reviewersgps
bugs1379559
servo-vcs-sync: configure overlay to notify via SNS (bug 1379559) r?gps MozReview-Commit-ID: 1ZqLlclqo0R
ansible/roles/vcs-sync/defaults/main.yml
ansible/roles/vcs-sync/files/servo-overlay.service
ansible/roles/vcs-sync/templates/servo-sync.env.j2
--- a/ansible/roles/vcs-sync/defaults/main.yml
+++ b/ansible/roles/vcs-sync/defaults/main.yml
@@ -12,21 +12,24 @@ servo_linear_hg_url: https://hg.mozilla.
 servo_linear_hg_push_url: ssh://hg.mozilla.org/projects/converted-servo-linear
 
 # URL of the integration Mercurial repo; used to detect backouts.
 backout_integration_url: https://hg.mozilla.org/integration/autoland
 # Github user/repo to create backout PRs.
 backout_github_name: servo/servo
 # Author of all backout PRs.
 backout_author: "Gecko Backout <gecko-backout@mozilla.org>"
-# S3 url to persist tracking data
+# S3 url to persist backout tracking data.
 backout_s3_upload_url: "s3://moz-vcssync-servo-commitmap/backout-tracking"
 
 # URL of Mercurial converted Servo repo to overlay into a Firefox repo.
 servo_overlay_source_url: https://hg.mozilla.org/projects/converted-servo-linear
 # Repository that converted Servo changesets should be overlayed into.
 servo_overlay_dest_url: https://hg.mozilla.org/integration/autoland
 # Where to push the overlayed result.
 servo_overlay_result_push_url: ssh://hg.mozilla.org/integration/autoland
 # Name of the tree on treestatus.mozilla.org.
 servo_overlay_push_tree: autoland
+# SNS topic ARN to publish overlay failures to.
+servo_overlay_error_topic: arn:aws:sns:us-west-2:699292812394:vcssync-servo-errors
 
+# S3 url to persist overlay tracking data.
 servo_shamap_s3_upload_url: "s3://moz-vcssync-servo-commitmap/shamap"
--- a/ansible/roles/vcs-sync/files/servo-overlay.service
+++ b/ansible/roles/vcs-sync/files/servo-overlay.service
@@ -12,12 +12,13 @@ EnvironmentFile=/home/servo-sync/servo-s
 ExecStart=/home/servo-sync/venv/bin/servo-overlay \
   $OVERLAY_SOURCE_URL \
   $OVERLAY_DEST_URL \
   /home/servo-sync/firefox-overlay \
   --into servo \
   --result-push-url $OVERLAY_RESULT_PUSH_URL \
   --push-tree $OVERLAY_PUSH_TREE \
   --hg /home/servo-sync/venv/bin/hg \
-  --overlay-hg-repos /home/servo-sync/venv/bin/overlay-hg-repos
+  --overlay-hg-repos /home/servo-sync/venv/bin/overlay-hg-repos \
+  --notify '~/publish-to-sns --subject "Servo Overlay Failure" --topic-arn $OVERLAY_ERROR_TOPIC'
 
 User=servo-sync
 Group=servo-sync
--- a/ansible/roles/vcs-sync/templates/servo-sync.env.j2
+++ b/ansible/roles/vcs-sync/templates/servo-sync.env.j2
@@ -3,15 +3,16 @@ GITHUB_TOKEN={{ servo_github_token | man
 LINEAR_GIT_SOURCE_URL={{ servo_linear_git_source_url | mandatory }}
 LINEAR_GIT_PUSH_URL={{ servo_linear_git_push_url | mandatory }}
 LINEAR_HG_PUSH_URL={{ servo_linear_hg_push_url | mandatory }}
 
 OVERLAY_SOURCE_URL={{ servo_overlay_source_url | mandatory }}
 OVERLAY_DEST_URL={{ servo_overlay_dest_url | mandatory }}
 OVERLAY_RESULT_PUSH_URL={{ servo_overlay_result_push_url | mandatory }}
 OVERLAY_PUSH_TREE={{ servo_overlay_push_tree | mandatory }}
+OVERLAY_ERROR_TOPIC={{ servo_overlay_error_topic | mandatory }}
 
 SHAMAP_S3_UPLOAD_URL={{ servo_shamap_s3_upload_url | mandatory }}
 
 BACKOUT_INTEGRATION_URL={{ backout_integration_url | mandatory }}
 BACKOUT_GITHUB_NAME={{ backout_github_name | mandatory }}
 BACKOUT_AUTHOR={{ backout_author | mandatory }}
 BACKOUT_S3_UPLOAD_URL={{ backout_s3_upload_url | mandatory }}