mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 21:43:30 +08:00
utils/docker-run: new script
Add a small script to run commands in the same docker image used in the GitLab CI. For instance, one can run check-package unit tests without installing pytest directly in the host: $ ./utils/docker-run python3 -m pytest -v utils/checkpackagelib/ Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> [Arnout: fix shellcheck errors; add exec] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
fcceee0b2e
commit
242e9d72e7
10
utils/docker-run
Executable file
10
utils/docker-run
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/bash
|
||||
set -o errexit -o pipefail
|
||||
DIR=$(dirname "${0}")
|
||||
MAIN_DIR=$(readlink -f "${DIR}/..")
|
||||
# shellcheck disable=SC2016
|
||||
IMAGE=$(grep ^image: "${MAIN_DIR}/.gitlab-ci.yml" | \
|
||||
sed -e 's,^image: ,,g' | sed -e 's,\$CI_REGISTRY,registry.gitlab.com,g')
|
||||
|
||||
set -x
|
||||
exec docker run -v "${MAIN_DIR}:/home/br-user" -t "${IMAGE}" "$@"
|
Loading…
Reference in New Issue
Block a user