iar-docker-images: Build image on EC2 node

Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I5eb8312dc4b5bcc231afa85d1f7364904c380ef1
diff --git a/iar-docker-images/builders.sh b/iar-docker-images/builders.sh
index 80771e6..d7765a3 100755
--- a/iar-docker-images/builders.sh
+++ b/iar-docker-images/builders.sh
@@ -7,6 +7,8 @@
     ON_EC2="1"
 fi
 
+cd iar-dockerfiles
+
 if [ "${ON_EC2}" == "1" ]; then
     if ! type aws
     then
@@ -17,21 +19,20 @@
         sudo ./aws/install
     fi
     aws configure list
-    export ECR=987685672616.dkr.ecr.us-east-1.amazonaws.com
-    # we are expecting private files to be kept in the dockerfiles/*
-    # subdirs with a matching name for the image
-    aws s3 cp --recursive s3://trustedfirmware-misra/dockerfiles/ .
+    export ECR=987685672616.dkr.ecr.us-east-1.amazonaws.com/iar
+    # Get IAR toolchain binary
+    aws s3 cp --recursive s3://trustedfirmware-iar/ .
     # Get armclang toolchain
     aws s3 cp --recursive s3://trustedfirmware-private/armclang/ .
     find .
     aws ecr get-login-password --region us-east-1|docker login --username AWS --password-stdin $ECR
+else
+    # Test on TF-02, copy armclang and IAR toolchain to the working dir
+    ls -l
+    cp /home/arthur.she/toolchain/* .
 fi
 
-# Test on TF-02, copy armclang and IAR toolchain to the working dir
-ls -l
-cp /home/arthur.she/toolchain/* ./iar-dockerfiles
 
-cd iar-dockerfiles
 
 image=$(dirname $(find . -name build.sh))
 test -d $image  && test -f $image/build.sh && \