ci-dockerfiles-deployment: Give access to trustedfirmware-private S3 bucket
CI image build scripts would now have access to the contents of
s3://trustedfirmware-private/armclang/ bucket, which is intended to contain
(e.g. mirror) files which cannot be accessed publicly.
This change only sets up a generic framework to provide such an access:
Contents of s3://trustedfirmware-private/armclang/ are overlayed on
contents of https://git.trustedfirmware.org/ci/dockerfiles.git/ repo:
effectively, contents of that S3 path will appear at the top-level
directory of dockerfiles/. An individual image's build.sh script
then should copy needed file(s) from this top-level directory down
to image directory (where build.sh and Dockerfile are located), and
then Dockerfile can reference those file(s).
Accessing the S3 bucket also requires running this job on the
build-amd64-private node (instead of build-amd64).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I86aa7c7cb53f40f10e1248504433d49a7156bb5c
diff --git a/ci-dockerfiles-deployment/builders.sh b/ci-dockerfiles-deployment/builders.sh
index a5b112c..5c8f066 100644
--- a/ci-dockerfiles-deployment/builders.sh
+++ b/ci-dockerfiles-deployment/builders.sh
@@ -8,9 +8,27 @@
env |grep '^GERRIT'
echo "########################################################################"
+# For dpkg-architecture call below
+sudo apt-get -y -qq install --no-install-recommends dpkg-dev
+
+if ! type aws
+then
+ sudo apt-get -y -qq update
+ sudo apt-get -y -qq install --no-install-recommends unzip
+ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
+ unzip awscliv2.zip
+ sudo ./aws/install
+fi
+
rm -f ${WORKSPACE}/log
cd dockerfiles/
+aws configure list
+aws s3 cp --recursive s3://trustedfirmware-private/armclang/ .
+find .
+
+df -h
+
git_previous_commit=$(git rev-parse HEAD~1)
git_commit=$(git rev-parse HEAD)
files=$(git diff --name-only ${git_previous_commit} ${git_commit})