@@ -59,7 +59,7 @@ func (c *cache) lookup(ctx context.Context, a *latest.Artifact, tag string, h ar
59
59
entry , cacheHit := c .artifactCache [hash ]
60
60
c .cacheMutex .RUnlock ()
61
61
if ! cacheHit {
62
- if entry , err = c .tryImport (ctx , a , tag , hash ); err != nil {
62
+ if entry , err = c .tryImport (ctx , tag , hash ); err != nil {
63
63
logrus .Debugf ("Could not import artifact from Docker, building instead (%s)" , err )
64
64
return needsBuilding {hash : hash }
65
65
}
@@ -120,7 +120,7 @@ func (c *cache) lookupRemote(ctx context.Context, hash, tag string, entry ImageD
120
120
return needsBuilding {hash : hash }
121
121
}
122
122
123
- func (c * cache ) tryImport (ctx context.Context , a * latest. Artifact , tag string , hash string ) (ImageDetails , error ) {
123
+ func (c * cache ) tryImport (ctx context.Context , tag string , hash string ) (ImageDetails , error ) {
124
124
if ! c .tryImportMissing {
125
125
return ImageDetails {}, fmt .Errorf ("import of missing images disabled" )
126
126
}
@@ -137,7 +137,7 @@ func (c *cache) tryImport(ctx context.Context, a *latest.Artifact, tag string, h
137
137
logrus .Debugf ("Importing artifact %s from local docker" , tag )
138
138
}
139
139
140
- imageID , err := c .client .ImageID (ctx , a . ImageName )
140
+ imageID , err := c .client .ImageID (ctx , tag )
141
141
if err != nil {
142
142
return entry , err
143
143
}
0 commit comments