mirror of
https://github.com/drone/drone-kaniko.git
synced 2026-06-04 18:23:49 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a567100359 |
@@ -432,6 +432,15 @@ func getPublicUrl(token, registryUrl, subscriptionId string) (string, error) {
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "failed to send request for getting container registry setting")
|
||||
}
|
||||
|
||||
if len(response.Value) == 0 {
|
||||
return "", errors.New("did not receive any registry information from /subscriptions API")
|
||||
}
|
||||
|
||||
if response.Value[0].ID == "" {
|
||||
return "", errors.New("received empty registry ID from /subscriptions API")
|
||||
}
|
||||
|
||||
return finalUrl + encodeParam(response.Value[0].ID), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user