blob: 44816d03234a61a82074e27537c9c99a48ce9044 [file] [log] [blame]
Riku Voipio9e35a3a2021-10-13 15:45:17 +03001#!/bin/bash
2
Arthur She6ffdd6c2022-04-08 11:22:39 -07003AMI=""
4[ ${BUILD_UBUNTU_AMI} == "true" ] && AMI="${AMI} ubuntu"
5[ ${BUILD_FREEBSD_AMI} == "true" ] && AMI="${AMI} freebsd"
Kelley Spoon6a3b6a12022-11-17 07:43:28 -06006[ ${BUILD_CUSTOM_AMI} == "true" ] && AMI="${AMI} custom"
Arthur She6ffdd6c2022-04-08 11:22:39 -07007
8[ -z "${AMI}" ] && echo "Build Nothing.." && exit
9
Riku Voipio9e35a3a2021-10-13 15:45:17 +030010rm -rf mbedtls-amis
Arthur She9807f372021-12-07 15:06:46 -080011git clone https://git.trustedfirmware.org/next/ci/mbedtls-amis.git
Riku Voipio9e35a3a2021-10-13 15:45:17 +030012cd mbedtls-amis
13
Arthur She6ffdd6c2022-04-08 11:22:39 -070014for os in ${AMI}
15do
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
21done