diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2024-04-26 13:37:58 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2024-04-26 13:37:58 +0000 |
commit | 3fdab81af9fe5d4cb8d8cc1997e10cb54ad06b96 (patch) | |
tree | 86ff8ec0d98220809765de603b418ac32d39e43c /tcwg-base | |
parent | bf2ad9a9ff8bab5d70e3f89107544ac95c36d500 (diff) |
tcwg-lnt: Add bin/lnt.sh helper to simplify calling lnt via "docker exec"
Change-Id: Ib56e1c0ec72e5b9d852e479bd503fd10f1d5ba2a
Diffstat (limited to 'tcwg-base')
-rw-r--r-- | tcwg-base/tcwg-lnt/Dockerfile.in | 4 | ||||
-rwxr-xr-x | tcwg-base/tcwg-lnt/build.sh | 8 | ||||
-rwxr-xr-x | tcwg-base/tcwg-lnt/lnt.sh | 6 | ||||
-rwxr-xr-x | tcwg-base/tcwg-lnt/run.sh | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/tcwg-base/tcwg-lnt/Dockerfile.in b/tcwg-base/tcwg-lnt/Dockerfile.in index 2e124627..d94d408d 100644 --- a/tcwg-base/tcwg-lnt/Dockerfile.in +++ b/tcwg-base/tcwg-lnt/Dockerfile.in @@ -1,6 +1,8 @@ FROM linaro/ci-#{ARCH}-tcwg-base-ubuntu:#{DISTRO} -RUN new-user.sh --user tcwg-buildslave +RUN new-user.sh --user tcwg-buildslave \ + && sudo -i -u tcwg-buildslave mkdir bin +COPY lnt.sh /home/tcwg-buildslave/bin COPY run.sh start.sh / diff --git a/tcwg-base/tcwg-lnt/build.sh b/tcwg-base/tcwg-lnt/build.sh index f4159dc8..518ff4a7 100755 --- a/tcwg-base/tcwg-lnt/build.sh +++ b/tcwg-base/tcwg-lnt/build.sh @@ -10,7 +10,7 @@ trap cleanup_exit INT TERM EXIT cleanup_exit() { - rm -rf run.sh start.sh + rm -rf lnt.sh run.sh start.sh } export LANG=C @@ -20,10 +20,12 @@ name=$(basename ${PWD} | cut -f3- -d '-') image=linaro/ci-${arch}-${name}-ubuntu:${distro} top=$(git rev-parse --show-toplevel) -cp $top/tcwg-base/tcwg-lnt/run.sh \ +cp $top/tcwg-base/tcwg-lnt/lnt.sh \ + $top/tcwg-base/tcwg-lnt/run.sh \ $top/tcwg-base/tcwg-lnt/start.sh ./ -(cd ..; ./build.sh) +#(cd ..; ./build.sh) +docker pull linaro/ci-${arch}-tcwg-base-ubuntu:${distro} "$top"/tcwg-base/validate-checksum.sh Dockerfile docker build --tag=$image . echo $image > .docker-tag diff --git a/tcwg-base/tcwg-lnt/lnt.sh b/tcwg-base/tcwg-lnt/lnt.sh new file mode 100755 index 00000000..e48c9181 --- /dev/null +++ b/tcwg-base/tcwg-lnt/lnt.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -euf -o pipefail + +. @LNTSERVER@/sandbox/bin/activate +exec lnt "$@" diff --git a/tcwg-base/tcwg-lnt/run.sh b/tcwg-base/tcwg-lnt/run.sh index 0bcee4ba..d703c62f 100755 --- a/tcwg-base/tcwg-lnt/run.sh +++ b/tcwg-base/tcwg-lnt/run.sh @@ -12,6 +12,8 @@ config="$1" user=tcwg-buildslave scripts=/home/$user/jenkins-scripts +sudo -i -u $user sed -i -e "s#@LNTSERVER@#/home/$user/$config/lntserver#" \ + bin/lnt.sh sudo -i -u $user rm -rf $scripts sudo -i -u $user git clone \ https://git.linaro.org/toolchain/jenkins-scripts.git $scripts |