aboutsummaryrefslogtreecommitdiff
path: root/stretch-arm64-testdef
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2019-02-07 13:05:57 +0100
committerDiana Picus <diana.picus@linaro.org>2019-02-07 13:06:07 +0100
commitf23dbeb4c17f2849f8f9bfd9e8ec443083551744 (patch)
tree035fc84a527115bddaf9d68c11bc5c8a7a7e9b4a /stretch-arm64-testdef
parent6e3975d175a8b395efef4d374fa3c963c497fc40 (diff)
parent0577b825203f9c221965f5eb2d16c289df2e1658 (diff)
Merge remote-tracking branch 'origin/tcwg-staging' into tcwg-llvmprodtcwg-llvmprod
Change-Id: I2f6c8930039c7399f6f58732bafca170d4baa2ad
Diffstat (limited to 'stretch-arm64-testdef')
-rw-r--r--stretch-arm64-testdef/Dockerfile3
-rwxr-xr-xstretch-arm64-testdef/build.sh20
2 files changed, 16 insertions, 7 deletions
diff --git a/stretch-arm64-testdef/Dockerfile b/stretch-arm64-testdef/Dockerfile
index 8a7aaa99..cd20f093 100644
--- a/stretch-arm64-testdef/Dockerfile
+++ b/stretch-arm64-testdef/Dockerfile
@@ -3,8 +3,9 @@ FROM linaro/ci-arm64-debian:stretch
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
python-pip \
- && git clone -b master http://git.linaro.org/qa/test-definitions.git \
+ && git clone http://git.linaro.org/qa/test-definitions.git \
&& cd test-definitions \
+ && git checkout master \
&& pip install -r automated/utils/requirements.txt \
&& apt-get clean \
&& rm -rf \
diff --git a/stretch-arm64-testdef/build.sh b/stretch-arm64-testdef/build.sh
index ac64154b..df1b8212 100755
--- a/stretch-arm64-testdef/build.sh
+++ b/stretch-arm64-testdef/build.sh
@@ -4,10 +4,18 @@ set -e
export LANG=C
-DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
-ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
-COMMIT_HASH=$(git ls-remote --heads https://git.linaro.org/qa/test-definitions.git | grep master | cut -c1-7)
+if [ -z "$1" ]; then
+ echo "Usage: ./build.sh <git_tag>"
+ tag="$(git ls-remote https://git.linaro.org/qa/test-definitions.git refs/heads/master | cut -c1-7)"
+ echo "Warning: git tag not specified, latest commit (${tag}) on master branch is used."
+else
+ tag="$1"
+ sed -i "s/git checkout master/git checkout ${tag} -b ${tag}/" Dockerfile
+fi
-image=linaro/testdef-${ARCHITECTURE}-debian-${DISTRIBUTION}:${COMMIT_HASH}
-docker build --pull --tag=$image .
-echo $image > .docker-tag
+DISTRIBUTION="$(basename "${PWD}" | cut -f1 -d '-')"
+ARCHITECTURE="$(basename "${PWD}" | cut -f2 -d '-')"
+
+image=linaro/testdef-${ARCHITECTURE}-debian-${DISTRIBUTION}:${tag}
+docker build --pull --tag="$image" .
+echo "$image" > .docker-tag