Riku Voipio | 9e35a3a | 2021-10-13 15:45:17 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Arthur She | 6ffdd6c | 2022-04-08 11:22:39 -0700 | [diff] [blame] | 3 | AMI="" |
| 4 | [ ${BUILD_UBUNTU_AMI} == "true" ] && AMI="${AMI} ubuntu" |
| 5 | [ ${BUILD_FREEBSD_AMI} == "true" ] && AMI="${AMI} freebsd" |
Kelley Spoon | 6a3b6a1 | 2022-11-17 07:43:28 -0600 | [diff] [blame^] | 6 | [ ${BUILD_CUSTOM_AMI} == "true" ] && AMI="${AMI} custom" |
Arthur She | 6ffdd6c | 2022-04-08 11:22:39 -0700 | [diff] [blame] | 7 | |
| 8 | [ -z "${AMI}" ] && echo "Build Nothing.." && exit |
| 9 | |
Riku Voipio | 9e35a3a | 2021-10-13 15:45:17 +0300 | [diff] [blame] | 10 | rm -rf mbedtls-amis |
Arthur She | 9807f37 | 2021-12-07 15:06:46 -0800 | [diff] [blame] | 11 | git clone https://git.trustedfirmware.org/next/ci/mbedtls-amis.git |
Riku Voipio | 9e35a3a | 2021-10-13 15:45:17 +0300 | [diff] [blame] | 12 | cd mbedtls-amis |
| 13 | |
Arthur She | 6ffdd6c | 2022-04-08 11:22:39 -0700 | [diff] [blame] | 14 | for os in ${AMI} |
| 15 | do |
| 16 | echo -e "\nBuild ${os} AMI" |
| 17 | [ ! -f "packer_${os}.json" ] && echo -e "\nERROR: Can not find packer_${os}.json" && exit -1 |
| 18 | # Dump packer_config.json to job log |
| 19 | cat packer_${os}.json |
| 20 | packer build packer_${os}.json |
| 21 | done |