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" |
| 6 | |
| 7 | [ -z "${AMI}" ] && echo "Build Nothing.." && exit |
| 8 | |
Riku Voipio | 9e35a3a | 2021-10-13 15:45:17 +0300 | [diff] [blame] | 9 | rm -rf mbedtls-amis |
Arthur She | 9807f37 | 2021-12-07 15:06:46 -0800 | [diff] [blame] | 10 | git clone https://git.trustedfirmware.org/next/ci/mbedtls-amis.git |
Riku Voipio | 9e35a3a | 2021-10-13 15:45:17 +0300 | [diff] [blame] | 11 | cd mbedtls-amis |
| 12 | |
Arthur She | 6ffdd6c | 2022-04-08 11:22:39 -0700 | [diff] [blame^] | 13 | for os in ${AMI} |
| 14 | do |
| 15 | echo -e "\nBuild ${os} AMI" |
| 16 | [ ! -f "packer_${os}.json" ] && echo -e "\nERROR: Can not find packer_${os}.json" && exit -1 |
| 17 | # Dump packer_config.json to job log |
| 18 | cat packer_${os}.json |
| 19 | packer build packer_${os}.json |
| 20 | done |
Riku Voipio | 9e35a3a | 2021-10-13 15:45:17 +0300 | [diff] [blame] | 21 | |