Populate Hafnium image name based on dynamic values

Avoid hardcoding the hafnium image name and instead use folder values
to create the image name. Also suffix the 'ubuntu' string into the
image following the new image name nomemclature from parent commit, so now
the image name would be trustedfirmware/ci-amd64-hafnium-ubuntu:bionic
instead of trustedfirmware/ci-amd64-hafnium:bionic.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I206b35eb9f8c897e6b63eef7d733fee8e3db8083
diff --git a/bionic-amd64-hafnium/build.sh b/bionic-amd64-hafnium/build.sh
index c0f93c8..1e2137d 100755
--- a/bionic-amd64-hafnium/build.sh
+++ b/bionic-amd64-hafnium/build.sh
@@ -11,11 +11,12 @@
 
 export LANG=C
 
-DISTRIBUTION=bionic
-ARCHITECTURE=amd64
+DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
+ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
+PROJECT=$(basename ${PWD} | cut -f3 -d '-')
 
 cp -a ../setup-sshd .
 
-image=trustedfirmware/ci-${ARCHITECTURE}-hafnium:${DISTRIBUTION}
+image=trustedfirmware/ci-${ARCHITECTURE}-${PROJECT}-ubuntu:${DISTRIBUTION}
 docker build --pull --tag=$image .
 echo $image > .docker-tag