Signed-off-by: Wu Fengguang wfg@mail.ustc.edu.cn --- container/mail-robot/lib/assign-account-email.rb | 3 +++ container/mail-robot/start | 1 + 2 files changed, 4 insertions(+)
diff --git a/container/mail-robot/lib/assign-account-email.rb b/container/mail-robot/lib/assign-account-email.rb index 0c5f8d4..a88626c 100755 --- a/container/mail-robot/lib/assign-account-email.rb +++ b/container/mail-robot/lib/assign-account-email.rb @@ -24,6 +24,9 @@ def build_apply_account_email(my_info) cat >> ~/.config/compass-ci/defaults/account.yaml <<-EOF my_email: #{my_info['my_email']} my_name: #{my_info['my_name']} + EOF + mkdir -p ~/.config/compass-ci/include/lab + cat >> ~/.config/compass-ci/include/lab/#{ENV['lab']}.yaml <<-EOF my_uuid: #{my_info['my_uuid']} EOF
diff --git a/container/mail-robot/start b/container/mail-robot/start index f8078b6..ad17c7a 100755 --- a/container/mail-robot/start +++ b/container/mail-robot/start @@ -16,6 +16,7 @@ names = Set.new %w[ SCHED_HTTPS_PORT ES_PORT MAILDIR + lab ]
defaults = relevant_defaults(names)
Ideally it could be most user friendly if we can have the same account in different labs. However it may not be easy in real world scenarios.
What do you think?
Thanks, Fengguang
On Tue, Dec 08, 2020 at 09:30:48AM +0800, Wu Fengguang wrote:
Signed-off-by: Wu Fengguang wfg@mail.ustc.edu.cn
container/mail-robot/lib/assign-account-email.rb | 3 +++ container/mail-robot/start | 1 + 2 files changed, 4 insertions(+)
diff --git a/container/mail-robot/lib/assign-account-email.rb b/container/mail-robot/lib/assign-account-email.rb index 0c5f8d4..a88626c 100755 --- a/container/mail-robot/lib/assign-account-email.rb +++ b/container/mail-robot/lib/assign-account-email.rb @@ -24,6 +24,9 @@ def build_apply_account_email(my_info) cat >> ~/.config/compass-ci/defaults/account.yaml <<-EOF my_email: #{my_info['my_email']} my_name: #{my_info['my_name']}
EOF
mkdir -p ~/.config/compass-ci/include/lab
cat >> ~/.config/compass-ci/include/lab/#{ENV['lab']}.yaml <<-EOF my_uuid: #{my_info['my_uuid']} EOF
diff --git a/container/mail-robot/start b/container/mail-robot/start index f8078b6..ad17c7a 100755 --- a/container/mail-robot/start +++ b/container/mail-robot/start @@ -16,6 +16,7 @@ names = Set.new %w[ SCHED_HTTPS_PORT ES_PORT MAILDIR
- lab
]
defaults = relevant_defaults(names)
2.23.0
On Tue, Dec 08, 2020 at 09:34:06AM +0800, Wu Fengguang wrote:
Ideally it could be most user friendly if we can have the same account in different labs. However it may not be easy in real world scenarios.
What do you think?
At present, we use my_email as the account and use the my_uuid as the password. We save my_email and my_uuid in the es.
The user don't care the lab, I'm a little confused that why we write the my_uuid to the lab.yaml.
Thanks, Xueliang
Thanks, Fengguang
On Tue, Dec 08, 2020 at 09:30:48AM +0800, Wu Fengguang wrote:
Signed-off-by: Wu Fengguang wfg@mail.ustc.edu.cn
container/mail-robot/lib/assign-account-email.rb | 3 +++ container/mail-robot/start | 1 + 2 files changed, 4 insertions(+)
diff --git a/container/mail-robot/lib/assign-account-email.rb b/container/mail-robot/lib/assign-account-email.rb index 0c5f8d4..a88626c 100755 --- a/container/mail-robot/lib/assign-account-email.rb +++ b/container/mail-robot/lib/assign-account-email.rb @@ -24,6 +24,9 @@ def build_apply_account_email(my_info) cat >> ~/.config/compass-ci/defaults/account.yaml <<-EOF my_email: #{my_info['my_email']} my_name: #{my_info['my_name']}
EOF
mkdir -p ~/.config/compass-ci/include/lab
cat >> ~/.config/compass-ci/include/lab/#{ENV['lab']}.yaml <<-EOF my_uuid: #{my_info['my_uuid']} EOF
diff --git a/container/mail-robot/start b/container/mail-robot/start index f8078b6..ad17c7a 100755 --- a/container/mail-robot/start +++ b/container/mail-robot/start @@ -16,6 +16,7 @@ names = Set.new %w[ SCHED_HTTPS_PORT ES_PORT MAILDIR
- lab
]
defaults = relevant_defaults(names)
2.23.0
On Tue, Dec 08, 2020 at 10:25:02AM +0800, Cao Xueliang wrote:
On Tue, Dec 08, 2020 at 09:34:06AM +0800, Wu Fengguang wrote:
Ideally it could be most user friendly if we can have the same account in different labs. However it may not be easy in real world scenarios.
What do you think?
At present, we use my_email as the account and use the my_uuid as the password. We save my_email and my_uuid in the es.
The user don't care the lab, I'm a little confused that why we write the my_uuid to the lab.yaml.
Good question.
Imagine some other organization setup a new lab, running its own ES database and services.
The user could apply the same account name to 2+ labs, he'll sure get different my_uuid from them. Like one can create the same user in 2 linux machine, however use different password.
However it's also possible one user create 2 different account names in 2 labs. Then the setup would be
~/.config/compass-ci/include/lab/lab1.yaml my_email: a@qq.com my_uuid: xxx
~/.config/compass-ci/include/lab/lab2.yaml my_email: b@163.com my_uuid: yyy
That could be the most general form. "my_name" should always be the same. "my_email" could be different, however typically I'd expect one to use the same email for different labs.
Thanks, Fengguang
On Tue, Dec 08, 2020 at 09:30:48AM +0800, Wu Fengguang wrote:
Signed-off-by: Wu Fengguang wfg@mail.ustc.edu.cn
container/mail-robot/lib/assign-account-email.rb | 3 +++ container/mail-robot/start | 1 + 2 files changed, 4 insertions(+)
diff --git a/container/mail-robot/lib/assign-account-email.rb b/container/mail-robot/lib/assign-account-email.rb index 0c5f8d4..a88626c 100755 --- a/container/mail-robot/lib/assign-account-email.rb +++ b/container/mail-robot/lib/assign-account-email.rb @@ -24,6 +24,9 @@ def build_apply_account_email(my_info) cat >> ~/.config/compass-ci/defaults/account.yaml <<-EOF my_email: #{my_info['my_email']} my_name: #{my_info['my_name']}
EOF
mkdir -p ~/.config/compass-ci/include/lab
cat >> ~/.config/compass-ci/include/lab/#{ENV['lab']}.yaml <<-EOF my_uuid: #{my_info['my_uuid']} EOF
diff --git a/container/mail-robot/start b/container/mail-robot/start index f8078b6..ad17c7a 100755 --- a/container/mail-robot/start +++ b/container/mail-robot/start @@ -16,6 +16,7 @@ names = Set.new %w[ SCHED_HTTPS_PORT ES_PORT MAILDIR
- lab
]
defaults = relevant_defaults(names)
2.23.0