On Wed, Jan 20, 2021 at 12:16:41PM +0800, Liu Yinsi wrote:
+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
auto-submit -> autosubmit keep name consistent, without '-'
How about keep the same with the container name? So we can know who will use the account.
Thanks, Xueliang
Thanks, Yinsi
+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 -- 2.23.0