mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 12:46:03 +01:00
Merge pull request #407 from ywk253100/bug_fix_for_access_log
add insecure filed to job log and pass variable insecure to base handler
This commit is contained in:
commit
a20928c910
@ -62,8 +62,8 @@ func NewDeleter(repository string, tags []string, dstURL, dstUsr, dstPwd string,
|
|||||||
dstClient: dstClient,
|
dstClient: dstClient,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
}
|
}
|
||||||
deleter.logger.Infof("initialization completed: repository: %s, tags: %v, destination URL: %s, destination user: %s",
|
deleter.logger.Infof("initialization completed: repository: %s, tags: %v, destination URL: %s, insecure: %v, destination user: %s",
|
||||||
deleter.repository, deleter.tags, deleter.dstURL, deleter.dstUsr)
|
deleter.repository, deleter.tags, deleter.dstURL, deleter.insecure, deleter.dstUsr)
|
||||||
return deleter, nil
|
return deleter, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,8 +80,8 @@ type BaseHandler struct {
|
|||||||
func InitBaseHandler(repository, srcURL, srcSecret,
|
func InitBaseHandler(repository, srcURL, srcSecret,
|
||||||
dstURL, dstUsr, dstPwd string, insecure bool, tags []string, logger *log.Logger) (*BaseHandler, error) {
|
dstURL, dstUsr, dstPwd string, insecure bool, tags []string, logger *log.Logger) (*BaseHandler, error) {
|
||||||
|
|
||||||
logger.Infof("initializing: repository: %s, tags: %v, source URL: %s, destination URL: %s, destination user: %s",
|
logger.Infof("initializing: repository: %s, tags: %v, source URL: %s, destination URL: %s, insecure: %v, destination user: %s",
|
||||||
repository, tags, srcURL, dstURL, dstUsr)
|
repository, tags, srcURL, dstURL, insecure, dstUsr)
|
||||||
|
|
||||||
base := &BaseHandler{
|
base := &BaseHandler{
|
||||||
repository: repository,
|
repository: repository,
|
||||||
@ -90,6 +90,7 @@ func InitBaseHandler(repository, srcURL, srcSecret,
|
|||||||
dstURL: dstURL,
|
dstURL: dstURL,
|
||||||
dstUsr: dstUsr,
|
dstUsr: dstUsr,
|
||||||
dstPwd: dstPwd,
|
dstPwd: dstPwd,
|
||||||
|
insecure: insecure,
|
||||||
blobsExistence: make(map[string]bool, 10),
|
blobsExistence: make(map[string]bool, 10),
|
||||||
logger: logger,
|
logger: logger,
|
||||||
}
|
}
|
||||||
@ -125,8 +126,8 @@ func InitBaseHandler(repository, srcURL, srcSecret,
|
|||||||
base.tags = tags
|
base.tags = tags
|
||||||
}
|
}
|
||||||
|
|
||||||
base.logger.Infof("initialization completed: project: %s, repository: %s, tags: %v, source URL: %s, destination URL: %s, destination user: %s",
|
base.logger.Infof("initialization completed: project: %s, repository: %s, tags: %v, source URL: %s, destination URL: %s, insecure: %v, destination user: %s",
|
||||||
base.project, base.repository, base.tags, base.srcURL, base.dstURL, base.dstUsr)
|
base.project, base.repository, base.tags, base.srcURL, base.dstURL, base.insecure, base.dstUsr)
|
||||||
|
|
||||||
return base, nil
|
return base, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user