mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-01 11:18:08 +08:00
Merge pull request #519 from fanyangyang/issue/449
fix import app error
This commit is contained in:
commit
5181967f47
@ -339,9 +339,11 @@ func (i *ImportApp) importPlugins() error {
|
||||
return image
|
||||
}
|
||||
if oldimage, ok := plugin.CheckGet("share_image"); ok {
|
||||
appKey, _ := plugin.Get("service_key").String()
|
||||
i.oldPluginPath[appKey], _ = oldimage.String()
|
||||
pluginID, _ := plugin.Get("plugin_id").String()
|
||||
i.oldPluginPath[pluginID], _ = oldimage.String()
|
||||
plugin.Set("share_image", getImageImage())
|
||||
} else {
|
||||
logrus.Warnf("plugin do not found share_image, skip it")
|
||||
}
|
||||
oldPlugins[index] = plugin
|
||||
}
|
||||
@ -387,7 +389,7 @@ func (i *ImportApp) importPlugins() error {
|
||||
user := plugin.Get("plugin_image.hub_user").String()
|
||||
pass := plugin.Get("plugin_image.hub_password").String()
|
||||
// 上传之前先要根据新的仓库地址修改镜像名
|
||||
image := i.oldPluginPath[plugin.Get("service_key").String()]
|
||||
image := i.oldPluginPath[plugin.Get("plugin_id").String()]
|
||||
imageName := sources.ImageNameWithNamespaceHandle(image)
|
||||
saveImageName := fmt.Sprintf("%s/%s:%s", builder.REGISTRYDOMAIN, imageName.Name, imageName.Tag)
|
||||
newImageName := plugin.Get("share_image").String()
|
||||
|
Loading…
Reference in New Issue
Block a user