[PATCH compass-ci] lib/job.cr: set sshr info when submit reproduce job

Signed-off-by: Wu Zhende <wuzhende666@163.com> --- src/lib/job.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 6f344fe..218e2e1 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -62,6 +62,7 @@ class Job return unless @hash.has_key?("my_uuid") || @hash.has_key?("my_token") check_account_info() + set_sshr_info() return end end @@ -203,7 +204,7 @@ class Job end private def set_sshr_info - return unless @hash["ssh_pub_key"]? + return unless @hash.has_key?("ssh_pub_key") self["sshr_port"] = ENV["SSHR_PORT"] self["sshr_port_base"] = ENV["SSHR_PORT_BASE"] -- 2.23.0

Changelog should explain the problem/situation. Why reproduce job is special? Thanks, Fengguang On Wed, Jan 06, 2021 at 09:23:39PM +0800, Wu Zhende wrote:
Signed-off-by: Wu Zhende <wuzhende666@163.com> --- src/lib/job.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 6f344fe..218e2e1 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -62,6 +62,7 @@ class Job return unless @hash.has_key?("my_uuid") || @hash.has_key?("my_token")
check_account_info() + set_sshr_info() return end end @@ -203,7 +204,7 @@ class Job end
private def set_sshr_info - return unless @hash["ssh_pub_key"]? + return unless @hash.has_key?("ssh_pub_key")
Why test ssh_pub_key instead of sshd? We auto get pubkey from DB and send to testbox for a registered user, however that's stored in job['my_ssh_pubkey'] not 'ssh_pub_key'.
self["sshr_port"] = ENV["SSHR_PORT"] self["sshr_port_base"] = ENV["SSHR_PORT_BASE"] -- 2.23.0
participants (2)
-
Wu Fengguang
-
Wu Zhende