Signed-off-by: Cao Xueliang caoxl78320@163.com --- sparrow/3-code/dev-env | 10 ++++++++++ sparrow/5-build/register-accounts | 14 ++++++++++++++ sparrow/install-tiny | 1 + 3 files changed, 25 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 diff --git a/sparrow/install-tiny b/sparrow/install-tiny index a291549..eb9b3cb 100755 --- a/sparrow/install-tiny +++ b/sparrow/install-tiny @@ -19,4 +19,5 @@ cd $CCI_SRC/sparrow || exit . /etc/profile.d/compass.sh 4-docker/buildall 5-build/ipxe +5-build/register-accounts 7-systemd/systemd-setup