diff contrib/automation/hgautomation/aws.py @ 43020:d1d919f679f7

automation: support and use Debian Buster by default While Debian Buster (Debian 10) was released in July, the AWS AMIs were not published until mid September. This commit teaches the automation system to create AMIs for Debian Buster. Since Debian Buster is the new stable Debian release, we make it the default distribution for automation. Differential Revision: https://phab.mercurial-scm.org/D6917
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 29 Sep 2019 11:29:25 -0700
parents 6952d42f9158
children 2372284d9457
line wrap: on
line diff
--- a/contrib/automation/hgautomation/aws.py	Sun Sep 29 11:24:14 2019 -0700
+++ b/contrib/automation/hgautomation/aws.py	Sun Sep 29 11:29:25 2019 -0700
@@ -54,6 +54,7 @@
 
 AMAZON_ACCOUNT_ID = '801119661308'
 DEBIAN_ACCOUNT_ID = '379101102735'
+DEBIAN_ACCOUNT_ID_2 = '136693071363'
 UBUNTU_ACCOUNT_ID = '099720109477'
 
 
@@ -807,7 +808,7 @@
     return image
 
 
-def ensure_linux_dev_ami(c: AWSConnection, distro='debian9', prefix='hg-'):
+def ensure_linux_dev_ami(c: AWSConnection, distro='debian10', prefix='hg-'):
     """Ensures a Linux development AMI is available and up-to-date.
 
     Returns an ``ec2.Image`` of either an existing AMI or a newly-built one.
@@ -824,6 +825,13 @@
             'debian-stretch-hvm-x86_64-gp2-2019-09-08-17994',
         )
         ssh_username = 'admin'
+    elif distro == 'debian10':
+        image = find_image(
+            ec2resource,
+            DEBIAN_ACCOUNT_ID_2,
+            'debian-10-amd64-20190909-10',
+        )
+        ssh_username = 'admin'
     elif distro == 'ubuntu18.04':
         image = find_image(
             ec2resource,