Don't build container image on every commit
Currently, we build the container image that's used for a MR with this rule:
rules:
# Automatically rebuild the container image if this file, the Dockerfile,
# the installed requirements or the kaniko template change
- changes:
- .gitlab-ci.yml
- Dockerfile
- requirements.txt
- .gitlab/ci_templates/**
# These changes need to be tracked because subsequent jobs will try to
# use the image that is tagged by this job.
- .gitlab/ci_scripts/*
- ansible/**/*
- flux/**/*
- test/**/*
- openappstack/**/*
Which is basically always :/ We need to find a way that the image is build on first commit for a MR, but not on subsequent ones (only if needed, i.e. if Dockerfile
or requirements.txt
change).
Because this will speed up the pipeline (related to #615 (closed)) I add this to %0.6.0