executable file for the container it can be run as the real command submit, when you run it, it will calls the command 'submit' in the container add ln for it to PATH, you can run it at anywhere.
Signed-off-by: Luan Shengde shdluan@163.com --- container/submit/submit | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 container/submit/submit
diff --git a/container/submit/submit b/container/submit/submit new file mode 100755 index 0000000..67a27d8 --- /dev/null +++ b/container/submit/submit @@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +suffix=$(date +%m%d-%H%M) +cmd=( + docker run + --rm + --name=submit-$USER-$suffix + -it + -v /etc/compass-ci:/etc/compass-ci:ro + -v $HOME/.config:/root/.config:ro + -v $HOME/.ssh:/root/.ssh:rw + submit + /root/lkp-tests/sbin/submit "$@" +) + +"${cmd[@]}" +
On Fri, Jan 29, 2021 at 03:10:40PM +0800, Luan Shengde wrote:
executable file for the container it can be run as the real command submit, when you run it, it will calls the command 'submit' in the container add ln for it to PATH, you can run it at anywhere.
Signed-off-by: Luan Shengde shdluan@163.com
container/submit/submit | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 container/submit/submit
diff --git a/container/submit/submit b/container/submit/submit new file mode 100755 index 0000000..67a27d8 --- /dev/null +++ b/container/submit/submit @@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+suffix=$(date +%m%d-%H%M) +cmd=(
- docker run
- --rm
--name=submit-$USER-$suffix
^^ indents
Thanks, Shenwei
-it
-v /etc/compass-ci:/etc/compass-ci:ro
-v $HOME/.config:/root/.config:ro
-v $HOME/.ssh:/root/.ssh:rw
- submit
- /root/lkp-tests/sbin/submit "$@"
+)
+"${cmd[@]}"
-- 2.23.0
+# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+suffix=$(date +%m%d-%H%M) +cmd=(
- docker run
- --rm
--name=submit-$USER-$suffix
^^ indents
OK, I will replace the tab keys to spaces.
Thanks, Luan Shengde
Thanks, Shenwei
-it
-v /etc/compass-ci:/etc/compass-ci:ro
-v $HOME/.config:/root/.config:ro
-v $HOME/.ssh:/root/.ssh:rw
- submit
- /root/lkp-tests/sbin/submit "$@"
+)
+"${cmd[@]}"
-- 2.23.0