Skip to content

Commit 84eec17

Browse files
committed
Switch from json to hcl file format for packer
Packer has its own file format in place of json for describing packer builds. We added the hcl file in a previous commit, but forgot to update build-amis.sh and remove the old json file. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 75cd029 commit 84eec17

File tree

2 files changed

+3
-357
lines changed

2 files changed

+3
-357
lines changed

jenkins/build-amis.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
OPTIND=1
1818
packer_opts=""
19+
packer_file="jenkins-amis.hcl"
1920

2021
while getopts "h?a:l" opt; do
2122
case "$opt" in
@@ -29,7 +30,7 @@ while getopts "h?a:l" opt; do
2930
packer_opts="--only ${OPTARG}"
3031
;;
3132
l)
32-
ami_list=`packer inspect -machine-readable packer.json | grep template-builder | cut -f4 -d, | xargs`
33+
ami_list=`packer inspect -machine-readable ${packer_file} | grep template-builder | cut -f4 -d, | xargs`
3334
echo "Available amis: ${ami_list}"
3435
exit 0
3536
;;
@@ -39,4 +40,4 @@ done
3940
export BUILD_DATE=`date +%Y%m%d%H%M`
4041
export AWS_IAM_ROLE="jenkins-worker"
4142

42-
packer build ${packer_opts} packer.json
43+
packer build ${packer_opts} ${packer_file}

jenkins/packer.json

Lines changed: 0 additions & 355 deletions
This file was deleted.

0 commit comments

Comments
 (0)