jammy-amd64-tf-a-build-lts2.8: A copy of jammy-amd64-tf-a-build

Make a separate image for TF-A LTS jobs, as requested in
https://linaro.atlassian.net/browse/TFC-450 . To emphasize that it's
based on jammy-amd64-tf-a-build, by default reuse (copy) all of its
files, unless this directory already has such a file (we start with
just build.sh being available, which copies the rest of files).

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Ia9bc144a2782870f0417eb6b848e137057db5ebe
diff --git a/jammy-amd64-tf-a-build-lts2.8/build.sh b/jammy-amd64-tf-a-build-lts2.8/build.sh
new file mode 100755
index 0000000..fa23e26
--- /dev/null
+++ b/jammy-amd64-tf-a-build-lts2.8/build.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -e
+
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+  rm -f *.list *.key
+}
+
+export LANG=C
+
+DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
+ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
+#PROJECT=$(basename ${PWD} | cut -f3 -d '-')-$(basename ${PWD} | cut -f4 -d '-')
+PROJECT=tf-a-lts2.8
+
+# This image is a fork of jammy-amd64-tf-a-build. Copy all files from there,
+# unless already exists here.
+for f in $(ls -1 ../jammy-amd64-tf-a-build/*); do
+    if [ ! -e $(basename $f) ]; then
+        cp -a $f .
+    fi
+done
+
+cp -a ../setup-sshd .
+
+# Copy armclang toolchains required for the build (previously fetched
+# from s3://trustedfirmware-private/armclang/ by build harness).
+cp ../DS500-BN-00026-r5p0-11rel0.tar.gz ../DS500-BN-00026-r5p0-19rel0.tar.gz .
+
+image=trustedfirmware/ci-${ARCHITECTURE}-${PROJECT}-ubuntu:${DISTRIBUTION}${DOCKER_SUFFIX}
+docker build --pull --no-cache --tag=$image .
+echo $image > .docker-tag