Skip to content

Commit

Permalink
Updated Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Jul 19, 2024
1 parent f843e5f commit 0a89965
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ phases:
runtime-versions:
python: 3.11
commands:
- echo "Installing Python version 3.11 ...
- echo "Installing Python version 3.11 ..."
- pyenv global $PYTHON_311_VERSION
- echo "Installing Ansible ..."
- pip3 install ansible
build:
commands:
- echo "Building with Packer ..."
- packer init build.pkr.hcl
- packer build -var project_name=rhel-arm-image-pipeline-demo -var ansible_dir=${CODEBUILD_SRC_DIR}/ansible build.pkr.hcl
- packer build -var project_name=rhel-arm-image-pipeline-demo -var ansible_dir=${CODEBUILD_SRC_DIR}/ansible build.pkr.hcl
post_build:
commands:
- echo "Saving AMI ID ..."
- packer build -machine-readable build.pkr.hcl | tee >(grep 'artifact,0,id' | cut -d, -f6 | cut -d: -f2 > ami_id.txt)
- test -s ami_id.txt || exit 1
2 changes: 1 addition & 1 deletion modules/image-pipeline/build.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "amazon-ebs" "rhel" {
ami_name = "rhel-arm-{{timestamp}}"
instance_type = "t4g.micro"
region = "us-gov-west-1"
source_ami = "ami-0ce8fc041db68907c"
source_ami = "ami-06ac1fe9004042996"
ssh_username = "ec2-user"
}

Expand Down

0 comments on commit 0a89965

Please sign in to comment.