зеркало из https://github.com/Azure/ARO-RP.git
Merge the Red Hat repo mirror loops and use the correct auth depending on repo domain.
This commit is contained in:
Родитель
d8e4f8edb0
Коммит
c8b2016ec1
|
@ -161,24 +161,18 @@ func mirror(ctx context.Context, log *logrus.Entry) error {
|
|||
"registry.access.redhat.com/ubi8/nodejs-14:latest",
|
||||
"registry.access.redhat.com/ubi7/go-toolset:1.16.12",
|
||||
"registry.access.redhat.com/ubi8/go-toolset:1.17.7",
|
||||
} {
|
||||
log.Printf("mirroring %s -> %s", ref, pkgmirror.Dest(dstAcr+acrDomainSuffix, ref))
|
||||
err = pkgmirror.Copy(ctx, pkgmirror.Dest(dstAcr+acrDomainSuffix, ref), ref, dstAuth, srcAuthRedhat)
|
||||
if err != nil {
|
||||
log.Errorf("%s: %s\n", ref, err)
|
||||
errorOccurred = true
|
||||
}
|
||||
}
|
||||
|
||||
for _, ref := range []string{
|
||||
// Managed Upgrade Operator
|
||||
"quay.io/app-sre/managed-upgrade-operator:v0.1.856-eebbe07",
|
||||
|
||||
// Hive
|
||||
"quay.io/app-sre/hive:2383a88",
|
||||
} {
|
||||
log.Printf("mirroring %s -> %s", ref, pkgmirror.Dest(dstAcr+acrDomainSuffix, ref))
|
||||
err = pkgmirror.Copy(ctx, pkgmirror.Dest(dstAcr+acrDomainSuffix, ref), ref, dstAuth, srcAuthQuay)
|
||||
|
||||
srcAuth := srcAuthRedhat
|
||||
if strings.Index(ref, "quay.io") == 0 {
|
||||
srcAuth = srcAuthQuay
|
||||
}
|
||||
|
||||
err = pkgmirror.Copy(ctx, pkgmirror.Dest(dstAcr+acrDomainSuffix, ref), ref, dstAuth, srcAuth)
|
||||
if err != nil {
|
||||
log.Errorf("%s: %s\n", ref, err)
|
||||
errorOccurred = true
|
||||
|
|
Загрузка…
Ссылка в новой задаче