blob: 27d1581f1568d7b16387d1b1f60bc318693cb063 [file] [log] [blame]
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -05001#!/bin/bash
2
Paul Sokolovsky1f249f12022-11-16 20:41:05 +03003set -ex
4
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -05005if ! type aws
6then
7 sudo apt-get -y -qq update
8 sudo apt-get -y -qq install --no-install-recommends unzip
9 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
Paul Sokolovsky1f249f12022-11-16 20:41:05 +030010 unzip -q awscliv2.zip
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050011 sudo ./aws/install
12fi
13
14rm -rf fvp-dockerfiles
15git clone https://git.trustedfirmware.org/ci/fvp-dockerfiles.git
16cd fvp-dockerfiles
Paul Sokolovsky0efe6832023-04-04 16:31:12 +030017git log -1
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050018
19aws configure list
Saheer Babu734d2ad2024-12-19 09:38:47 +000020export ECR=${PRIVATE_CONTAINER_REGISTRY}
21aws s3 cp --recursive s3://openci-trustedfirmware-fvp-${INFRA_ENV}/ .
22aws ecr get-login-password --region eu-west-1|docker login --username AWS --password-stdin $ECR
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050023
24
25for tarball in F*.tgz
26do
Paul Sokolovsky8bc7df22023-07-28 21:30:30 +030027 df -h
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050028 tag=$(./create-model-tag.sh $tarball)
29 mkdir -p $tag
Paul Sokolovsky501520d2024-05-25 22:23:05 +030030 cp setup-sshd stdout-flush-wrapper*.sh setup-ubl $tag/
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050031 mv $tarball $tag/
Paul Sokolovsky2ab62872024-05-25 15:04:30 +030032 cp swskt-linaro-root*.lic $tag/
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050033 ./create-model-dockerfile.sh $tarball $tag
34 (
35 set -ex
36 cd $tag
37 docker build --tag $ECR/fvp:$tag .
Paul Sokolovsky6110c682023-07-28 21:27:18 +030038 echo "Docker image created"
39 echo "Docker image name: fvp:${tag}"
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050040 docker push $ECR/fvp:$tag
Paul Sokolovsky040bb882023-07-28 21:49:36 +030041 # Remove image locally to free up space for the remaining images in loop
42 docker image rm $ECR/fvp:$tag
Leonardo Sandoval9d38c8f2021-08-06 13:59:59 -050043 )
44
45done
46