On Tue, Oct 13, 2020 at 09:23:20AM +0800, Luan Shengde wrote:
Signed-off-by: Luan Shengde luanshengde2@huawei.com
container/mail-robot/start | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..a2e183d --- /dev/null +++ b/container/mail-robot/start @@ -0,0 +1,29 @@ +#!/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_relative '../defconfig.rb'
Blank line here. Have you run rubocop?
+docker_rm 'mail-robot'
+JUMPER_IP = '192.168.132.2'
IP => HOST
+JUMPER_PORT = '29999' +SEND_MAIL_PORT = '11311'
Load from defaults?
container/assign-account/answerback-email.rb:56:SEND_MAIL_PORT = defaults['SEND_MAIL_PORT']
+cmd = %W[
- docker run
- --restart=always
- --name=mail-robot
- -d
- -e JUMPER_IP=#{JUMPER_IP}
- -e JUMPER_PORT=#{JUMPER_PORT}
- -e SEND_MAIL_PORT=#{SEND_MAIL_PORT}
- -v /c/upstream-repos:/upstream-repos:ro
- -v /srv/cci/Maildir:/Maildir:rw
- -v /c/compass-ci:/compass-ci:ro
Please keep same dir name for consistency.
- mail-robot
+]
+cmd += ['bash', '-c', 'umask 002 && ruby ./mail-robot.rb']
Set umask in ruby script?
+system(*cmd)
2.23.0