On Mon, Nov 09, 2020 at 05:23:21PM +0800, Luan Shengde wrote:
On Mon, Nov 09, 2020 at 04:41:48PM +0800, Wang Chenglong wrote:
On Mon, Nov 09, 2020 at 04:19:10PM +0800, Luan Shengde wrote:
Signed-off-by: Luan Shengde shdluan@163.com
container/mail-robot/start | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 container/mail-robot/start
diff --git a/container/mail-robot/start b/container/mail-robot/start new file mode 100755 index 0000000..3f9a1c6 --- /dev/null +++ b/container/mail-robot/start @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true
+require 'set' +require_relative '../defconfig'
How about use the absolute path at here?
If i run './mail-robot/start'. It will put error.
if you don't separately copy directory mail-robot, it will not throw any error.
sorry I see something wrong. It can be written as "#{SRC_CCI}/container/defconfig"
Thanks, Luan Shengde
Thanks, Luan Shengde
Thanks, Chenglong
+docker_rm 'mail-robot'
+names = Set.new %w[
- JUMPER_HOST
- JUMPER_PORT
- SEND_MAIL_PORT
+]
+defaults = relevant_defaults(names)
+env = docker_env(defaults)
+cmd = %w[
- docker run
- --restart=always
- --name=mail-robot
- -d
+] + env + %W[
- -v /c/upstream-repos:/c/upstream-repos:ro
- -v /srv/cci/Maildir/.compass-ci:/srv/cci/Maildir/.compass-ci:rw
- -v #{ENV['CCI_SRC']}:/c/compass-ci:rw
- -w /c/compass-ci/container/mail-robot
- mail-robot
+]
+cmd += ['ruby', 'run-mail-robot.rb']
+system(*cmd)
2.23.0