skaffold
skaffold copied to clipboard
`custom.dependencies.ignore` is not working properly
Hello, I am observing a strange behavior with the custom.dependencies.ignore array.
Take this skaffold config:
apiVersion: skaffold/v4beta12
kind: Config
metadata:
name: myproject
build:
artifacts:
- image: myimage
context: ./test-build-avoidance
custom:
buildCommand: ./build.sh myimage
dependencies:
paths:
- ./src/*
ignore:
- ./src/ignore/*
tagPolicy:
dateTime: {}
local:
push: true
And this structure:
test-build-avoidance/
├── build.sh
└── src
├── ignore
│ └── tobeignored
└── randomcode
When I run this command skaffold build --cache-file skaffold.cache -d myregistry:
- First time it builds the app normally, push the image and puts digests in
skaffold.cachefile - Second time it does not build, but only find and tag the first image with the new tag
- Now I change something in the file
tobeignored - Third time the build is triggered again but it shouldn’t be from my understanding
This is the output of skaffold diagnose. I notice that even with this command the file tobeignored is counted.
Generating tags...
- myimage -> myimage:2025-03-14_10-59-00.577_CET
Skaffold version: 62fba6a236833db0d0d689a33e0b1007518d3456
Configuration version: skaffold/v4beta12
Number of artifacts: 1
Custom artifact: myimage
- Dependencies: 2 files
- Time to list dependencies: 220.218µs (2nd time: 68.687µs)
- Time to compute mTimes on dependencies: 8.498µs (2nd time: 3.247µs)
Thank you in advance!