mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-26 18:48:02 +01:00
commit
8c003e950b
@ -90,7 +90,7 @@ func (d *Deleter) enter() (string, error) {
|
|||||||
|
|
||||||
// delete repository
|
// delete repository
|
||||||
if len(d.tags) == 0 {
|
if len(d.tags) == 0 {
|
||||||
u := url + "?repo_name=" + d.repository
|
u := url + d.repository + "/tags"
|
||||||
if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil {
|
if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil {
|
||||||
if err == errNotFound {
|
if err == errNotFound {
|
||||||
d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL)
|
d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL)
|
||||||
@ -109,7 +109,7 @@ func (d *Deleter) enter() (string, error) {
|
|||||||
|
|
||||||
// delele tags
|
// delele tags
|
||||||
for _, tag := range d.tags {
|
for _, tag := range d.tags {
|
||||||
u := url + "?repo_name=" + d.repository + "&tag=" + tag
|
u := url + d.repository + "/tags/" + tag
|
||||||
if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil {
|
if err := del(u, d.dstUsr, d.dstPwd, d.insecure); err != nil {
|
||||||
if err == errNotFound {
|
if err == errNotFound {
|
||||||
d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL)
|
d.logger.Warningf("repository %s does not exist on %s", d.repository, d.dstURL)
|
||||||
|
Loading…
Reference in New Issue
Block a user