Pls ignored this patch, will send v2.
Thanks, Xueliang
On Wed, Jan 20, 2021 at 09:53:40AM +0800, Cao Xueliang wrote:
Signed-off-by: Cao Xueliang caoxl78320@163.com
sparrow/3-code/dev-env | 10 ++++++++++ sparrow/5-build/register-accounts | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 sparrow/5-build/register-accounts
diff --git a/sparrow/3-code/dev-env b/sparrow/3-code/dev-env index 4bafa80..2ba9662 100755 --- a/sparrow/3-code/dev-env +++ b/sparrow/3-code/dev-env @@ -60,6 +60,16 @@ export REPO_SRC=/c/upstream-repos export PATH="$PATH:$CCI_SRC/sbin:$LKP_SRC/sbin:$LKP_SRC/bin" EOF
+mkdir -p /etc/compass-ci/register +cat > /etc/compass-ci/register/register.yaml <<'EOF' +delimiter:
- my_email: delimiter@localhost
- my_name: delimiter
+auto-submit:
- my_email: auto-submit@localhost
- my_name: auto-submit
+EOF
source /etc/os-release
path=$(dirname ${BASH_SOURCE[0]})/os/${ID} diff --git a/sparrow/5-build/register-accounts b/sparrow/5-build/register-accounts new file mode 100755 index 0000000..41126f9 --- /dev/null +++ b/sparrow/5-build/register-accounts @@ -0,0 +1,14 @@ +#!/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 'yaml' +require_relative "#{ENV['CCI_SRC']}/lib/es_client" +require_relative "#{ENV['CCI_SRC']}/lib/build_my_info_client"
+content = YAML.load_file('/etc/compass-ci/register/register.yaml') +content.each do |key, value|
- build_my_info = BuildMyInfo.new(value['my_email'], value['my_name'], ENV['lab'])
- build_my_info.store_account_info
+end
2.23.0