Skip to content

Commit

Permalink
feat: Add Dockerfile to digest calculation
Browse files Browse the repository at this point in the history
Previously changes in Dockerfile did not lead to a new artifact being
built.
  • Loading branch information
AndreasBergmeier6176 committed Jan 15, 2025
1 parent 4459228 commit 404e504
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/skaffold/tag/input_digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ func (t *inputDigestTagger) GenerateTag(ctx context.Context, image latest.Artifa
return "", err
}

if image.DockerArtifact != nil {
srcFiles = append(srcFiles, image.DockerArtifact.DockerfilePath)
}

if image.KanikoArtifact != nil {
srcFiles = append(srcFiles, image.KanikoArtifact.DockerfilePath)
}

if image.CustomArtifact != nil && image.CustomArtifact.Dependencies != nil && image.CustomArtifact.Dependencies.Dockerfile != nil {
srcFiles = append(srcFiles, image.CustomArtifact.Dependencies.Dockerfile.Path)
}

// must sort as hashing is sensitive to the order in which files are processed
sort.Strings(srcFiles)
for _, d := range srcFiles {
Expand Down

0 comments on commit 404e504

Please sign in to comment.