Skip to content

Commit

Permalink
upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirrk committed Mar 12, 2024
1 parent b78f3ac commit a65bdd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/packer/ubuntu-jammy-x86_64-public-ami.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ data "amazon-ami" "autogenerated_1" {
locals {
skip_create_ami = var.skip_create_ami == "True"
timestamp = regex_replace(timestamp(), "[- TZ:]", "")
clean_name = regex_replace(lower(timestamp()), "[^a-z0-9-]", "-")
clean_name = regex_replace(timestamp(), "[^a-zA-Z0-9-]", "-")
}

source "amazon-ebs" "autogenerated_1" {
ami_groups = ["all"]
ami_name = "public-avalanche-ubuntu-${var.version}-${var.tag}-${local.timestamp}"
instance_type = "c5.large"
region = "us-east-1"
skip_create_ami = "${local.skip_create_ami}"
skip_create_ami = local.skip_create_ami
source_ami = "${data.amazon-ami.autogenerated_1.id}"
ssh_username = "ubuntu"
tags = {
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/update-ami.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@
def packer_build(packerfile):
print("Running the packer build")
subprocess.run('/usr/local/bin/packer init ' + packerfile, shell=True)
output = subprocess.run('/usr/local/bin/packer build ' + packerfile, shell=True, stdout=subprocess.PIPE)
print(output.stdout)
found = re.findall('ami-[a-z0-9]*', str(output.stdout))

if found:
amiid = found[-1]
print("Found amiId=" + amiid)
else:
print("Did not find amiId")
subprocess.run('/usr/local/bin/packer build ' + packerfile, shell=True)

def packer_build_update(packerfile):
print("Creating packer AMI image for Marketplace")
Expand Down

0 comments on commit a65bdd4

Please sign in to comment.