Remove redundant repoAccess

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This commit is contained in:
Paulo Gomes 2022-11-01 12:42:48 +00:00
parent 32b8e78f6c
commit b00625bffc
No known key found for this signature in database
GPG Key ID: 9995233870E99BEE
1 changed files with 0 additions and 8 deletions

View File

@ -247,8 +247,6 @@ func (r *ImageUpdateAutomationReconciler) Reconcile(ctx context.Context, req ctr
} }
}() }()
// FIXME use context with deadline for at least the following ops
debuglog.Info("attempting to clone git repository", "gitrepository", originName, "ref", ref, "working", tmp) debuglog.Info("attempting to clone git repository", "gitrepository", originName, "ref", ref, "working", tmp)
authOpts, err := r.getAuthOpts(ctx, &origin) authOpts, err := r.getAuthOpts(ctx, &origin)
@ -339,7 +337,6 @@ func (r *ImageUpdateAutomationReconciler) Reconcile(ctx context.Context, req ctr
debuglog.Info("ran updates to working dir", "working", tmp) debuglog.Info("ran updates to working dir", "working", tmp)
var statusMessage string var statusMessage string
var signingEntity *openpgp.Entity var signingEntity *openpgp.Entity
if gitSpec.Commit.SigningKey != nil { if gitSpec.Commit.SigningKey != nil {
if signingEntity, err = r.getSigningEntity(ctx, auto); err != nil { if signingEntity, err = r.getSigningEntity(ctx, auto); err != nil {
@ -501,11 +498,6 @@ func (r *ImageUpdateAutomationReconciler) automationsForImagePolicy(obj client.O
return reqs return reqs
} }
type repoAccess struct {
auth *git.AuthOptions
url string
}
func (r *ImageUpdateAutomationReconciler) getAuthOpts(ctx context.Context, repository *sourcev1.GitRepository) (*git.AuthOptions, error) { func (r *ImageUpdateAutomationReconciler) getAuthOpts(ctx context.Context, repository *sourcev1.GitRepository) (*git.AuthOptions, error) {
var data map[string][]byte var data map[string][]byte
if repository.Spec.SecretRef != nil { if repository.Spec.SecretRef != nil {