mirror of https://github.com/knative/func.git
fix: building resets image digest (#1691)
Fixes a bug where the image digest was being cleared on a subsequent deploy, resulting in incorrect metadata and a build stamp which was always out-of-date (effectively disabling cached builds).
This commit is contained in:
parent
135dba049d
commit
fd3aca35a3
|
@ -430,10 +430,13 @@ func (c deployConfig) Configure(f fn.Function) (fn.Function, error) {
|
|||
// ImageDigest
|
||||
// Parsed off f.Image if provided. Deploying adds the ability to specify a
|
||||
// digest on the associated image (not available on build as nonsensical).
|
||||
f.ImageDigest, err = imageDigest(f.Image)
|
||||
newDigest, err := imageDigest(f.Image)
|
||||
if err != nil {
|
||||
return f, err
|
||||
}
|
||||
if newDigest != "" {
|
||||
f.ImageDigest = newDigest
|
||||
}
|
||||
|
||||
// Envs
|
||||
// Preprocesses any Envs provided (which may include removals) into a final
|
||||
|
|
Loading…
Reference in New Issue