Commit d8ce5b4c authored by duanjinfei's avatar duanjinfei

match sign

parent a73743b8
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"bytes" "bytes"
"context" "context"
"encoding/json" "encoding/json"
"example.com/m/conf"
"example.com/m/log" "example.com/m/log"
"example.com/m/models" "example.com/m/models"
"fmt" "fmt"
...@@ -73,6 +74,7 @@ func (d *DockerOp) GetContainerSign(taskMsg *nodemanagerv1.PushTaskMessage, task ...@@ -73,6 +74,7 @@ func (d *DockerOp) GetContainerSign(taskMsg *nodemanagerv1.PushTaskMessage, task
log.Errorf("failed to unmarshal task cmd: %s", err.Error()) log.Errorf("failed to unmarshal task cmd: %s", err.Error())
return nil return nil
} }
taskCmd.ImageName = fmt.Sprintf("%s-%s", taskCmd.ImageName, conf.GetConfig().OpSys)
log.WithField("imageName", taskCmd.ImageName).WithField("url", d.SignApi[taskCmd.ImageName]).Info("container sign") log.WithField("imageName", taskCmd.ImageName).WithField("url", d.SignApi[taskCmd.ImageName]).Info("container sign")
request, err := http.NewRequest("POST", d.SignApi[taskCmd.ImageName], bytes.NewReader(body)) request, err := http.NewRequest("POST", d.SignApi[taskCmd.ImageName], bytes.NewReader(body))
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment