[error] root@taishan200-2280-2s64p-256g--a9 /c/compass-ci/container/es# docker exec -it auto-submit sh /c/lkp-tests/sbin $ ./submit iperf.yaml testbox=vm-2p8g submit /c/lkp-tests/jobs/iperf.yaml failed, got job_id=0, error: Missing required job key: 'my_email'. Please refer to https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/apply-accou... submit /c/lkp-tests/jobs/iperf.yaml failed, got job_id=0, error: Missing required job key: 'my_email'. Please refer to https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/apply-accou...
[how] for user intall compass-ci at their local server, need to verify when submit job in auto-submit container, so store autosubmit_info to ES, and mount yaml file in container.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- container/auto-submit/start | 2 +- lib/build_my_info_client.rb | 4 ++-- sbin/build-my-info.rb | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/container/auto-submit/start b/container/auto-submit/start index c25fbdd..e66cf57 100755 --- a/container/auto-submit/start +++ b/container/auto-submit/start @@ -21,7 +21,7 @@ cmd = %W[ -v #{ENV['LKP_SRC']}:#{DOCKER_LKP} -v /etc/localtime:/etc/localtime:ro -v /etc/compass-ci/defaults:/etc/compass-ci/defaults:ro - -v /etc/compass-ci/account:/etc/compass-ci/account:ro + -v /etc/compass-ci/account:/home/lkp/.config/compass-ci/defaults:ro -v /srv/git:/srv/git -w /c/compass-ci/sbin alpine:auto-submit diff --git a/lib/build_my_info_client.rb b/lib/build_my_info_client.rb index 162bf9f..d0d4b77 100755 --- a/lib/build_my_info_client.rb +++ b/lib/build_my_info_client.rb @@ -21,12 +21,12 @@ require_relative '../lib/es_client' # build_my_info = BuildMyInfo.new(email, name, lab) # build_my_info.config_my_info class BuildMyInfo - def initialize(my_email, my_name, lab) + def initialize(my_email, my_name, lab, my_token = %x(uuidgen).chomp) @lab = lab || 'nolab' @my_info = { 'my_email' => my_email, 'my_name' => my_name, - 'my_token' => %x(uuidgen).chomp, + 'my_token' => my_token, 'my_login_name' => nil, 'my_commit_url' => nil, 'my_ssh_pubkey' => [] diff --git a/sbin/build-my-info.rb b/sbin/build-my-info.rb index fd75f51..d68932e 100755 --- a/sbin/build-my-info.rb +++ b/sbin/build-my-info.rb @@ -31,3 +31,7 @@ options.parse!
build_my_info = BuildMyInfo.new(option[:my_email], option[:my_name], option[:lab]) build_my_info.config_my_info + +autosubmit_info = YAML.load_file('/etc/compass-ci/account/autosubmit.yaml') +build_autosubmit_info = BuildMyInfo.new(autosubmit_info['my_email'], autosubmit_info['my_name'], autosubmit_info['lab'], autosubmit_info['my_token']) +build_autosubmit_info.store_account_info
On Mon, Jan 11, 2021 at 07:50:32PM +0800, Liu Yinsi wrote:
[error] root@taishan200-2280-2s64p-256g--a9 /c/compass-ci/container/es# docker exec -it auto-submit sh /c/lkp-tests/sbin $ ./submit iperf.yaml testbox=vm-2p8g submit /c/lkp-tests/jobs/iperf.yaml failed, got job_id=0, error: Missing required job key: 'my_email'. Please refer to https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/apply-accou... submit /c/lkp-tests/jobs/iperf.yaml failed, got job_id=0, error: Missing required job key: 'my_email'. Please refer to https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/apply-accou...
[how] for user intall compass-ci at their local server, need to verify when submit job in auto-submit container, so store autosubmit_info to ES, and mount yaml file in container.
Signed-off-by: Liu Yinsi liuyinsi@163.com
container/auto-submit/start | 2 +- lib/build_my_info_client.rb | 4 ++-- sbin/build-my-info.rb | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/container/auto-submit/start b/container/auto-submit/start index c25fbdd..e66cf57 100755 --- a/container/auto-submit/start +++ b/container/auto-submit/start @@ -21,7 +21,7 @@ cmd = %W[ -v #{ENV['LKP_SRC']}:#{DOCKER_LKP} -v /etc/localtime:/etc/localtime:ro -v /etc/compass-ci/defaults:/etc/compass-ci/defaults:ro
- -v /etc/compass-ci/account:/etc/compass-ci/account:ro
- -v /etc/compass-ci/account:/home/lkp/.config/compass-ci/defaults:ro
-v /etc/compass-ci/account:/etc/compass-ci/defaults:ro
-v /srv/git:/srv/git -w /c/compass-ci/sbin alpine:auto-submit diff --git a/lib/build_my_info_client.rb b/lib/build_my_info_client.rb index 162bf9f..d0d4b77 100755 --- a/lib/build_my_info_client.rb +++ b/lib/build_my_info_client.rb @@ -21,12 +21,12 @@ require_relative '../lib/es_client' # build_my_info = BuildMyInfo.new(email, name, lab) # build_my_info.config_my_info class BuildMyInfo
- def initialize(my_email, my_name, lab)
def initialize(my_email, my_name, lab, my_token=nil)
@lab = lab || 'nolab' @my_token = my_token || %x(uuidgen).chomp @my_info = { 'my_email' => my_email, 'my_name' => my_name,
'my_token' => %x(uuidgen).chomp,
'my_token' => @my_token, 'my_login_name' => nil, 'my_commit_url' => nil, 'my_ssh_pubkey' => []
diff --git a/sbin/build-my-info.rb b/sbin/build-my-info.rb index fd75f51..d68932e 100755 --- a/sbin/build-my-info.rb +++ b/sbin/build-my-info.rb @@ -31,3 +31,7 @@ options.parse!
build_my_info = BuildMyInfo.new(option[:my_email], option[:my_name], option[:lab]) build_my_info.config_my_info
+autosubmit_info = YAML.load_file('/etc/compass-ci/account/autosubmit.yaml') +build_autosubmit_info = BuildMyInfo.new(autosubmit_info['my_email'], autosubmit_info['my_name'], autosubmit_info['lab'], autosubmit_info['my_token'])
+build_autosubmit_info.store_account_info
2.23.0
-v /etc/compass-ci/account:/etc/compass-ci/defaults:ro
got it
-v /srv/git:/srv/git -w /c/compass-ci/sbin alpine:auto-submit diff --git a/lib/build_my_info_client.rb b/lib/build_my_info_client.rb index 162bf9f..d0d4b77 100755 --- a/lib/build_my_info_client.rb +++ b/lib/build_my_info_client.rb @@ -21,12 +21,12 @@ require_relative '../lib/es_client' # build_my_info = BuildMyInfo.new(email, name, lab) # build_my_info.config_my_info class BuildMyInfo
- def initialize(my_email, my_name, lab)
def initialize(my_email, my_name, lab, my_token=nil)
ok
Thanks, Yinsi
@lab = lab || 'nolab' @my_token = my_token || %x(uuidgen).chomp @my_info = { 'my_email' => my_email, 'my_name' => my_name,
'my_token' => %x(uuidgen).chomp,
'my_token' => @my_token, 'my_login_name' => nil, 'my_commit_url' => nil, 'my_ssh_pubkey' => []
diff --git a/sbin/build-my-info.rb b/sbin/build-my-info.rb index fd75f51..d68932e 100755 --- a/sbin/build-my-info.rb +++ b/sbin/build-my-info.rb @@ -31,3 +31,7 @@ options.parse!
build_my_info = BuildMyInfo.new(option[:my_email], option[:my_name], option[:lab]) build_my_info.config_my_info
+autosubmit_info = YAML.load_file('/etc/compass-ci/account/autosubmit.yaml') +build_autosubmit_info = BuildMyInfo.new(autosubmit_info['my_email'], autosubmit_info['my_name'], autosubmit_info['lab'], autosubmit_info['my_token'])
+build_autosubmit_info.store_account_info
2.23.0