GoogleContainerTools / GoogleContainerTools/skaffold
Exceptions for files and directories - File Sync
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
I have ruby project and use sync tool.
The directories in project are:
- app
- config
- db
- lib
- spec
and etc
Dockerfile (simplified)
```
FROM ruby
RUN mkdir -p /backend
WORKDIR /backend
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
RUN bundle exec assets:precompile
```
skaffold.yaml
```yaml
apiVersion: skaffold/v2beta1
kind: Config
build:
artifacts:
- image: backend-dev
profiles:
- name: dev
activation:
- command: dev
build:
artifacts:
- image: backend-dev
sync:
manual:
- src: 'app/**/*'
dest: '/backend'
- src: 'config/**/*'
dest: '/backend'
- src: 'db/**/*'
dest: '/backend'
- src: 'lib/**/*'
dest: '/backend'
- src: 'spec/**/*'
dest: '/backend'
- src: 'README.md'
dest: '/backend'
- src: 'run.sh'
dest: '/backend'
```
And here are not all the directory and files that do not need to rebuild.
I need to rebuild when changing only Dockerfile, Gemfile, Gemfile.lock.
It would be great to have exception, for example
```yaml
sync:
except:
- Dockerfile
- Gemfile
- Gemfile.lock
```
Thus, the container was build only when these files modified. The rest of the files would just sync.
May be it's too much and possible some regex can be done for this? Or something else?
Thanks for the cool project!
- Skaffold version: v1.7.0
- Operating system: Ubuntu 18.04
Contributor guide
Assessment
This issue has not been assessed yet.