cicd: build images in cicd job
Also somehow automate this in a schedule, so images are rebuilt automatically once a week or so. GitLab's scheduled pipeline can be used for this. Keep in mind this schedule has to ONLY run the image building job. Scheduled pipeline can set variables, so use this to determine which jobs to run in the yaml.
https://git.mel.vin/help/user/project/pipelines/schedules
The goal is:
- The scheduled pipeline runs for master once a week, only building the images.
-
Pushes to master also run the image building job (and also all regular jobs).- 2020-01-30: Pushes to master will not build images, only changes to docker targets unless environment variables force image build.
- Pushes to non-master do NOT run the image job by default, instead this is should be a manual action (see CICD yaml docs: https://git.mel.vin/help/ci/yaml/README.md).
- 2020-01-17: It appears rules can be used to trigger build job (but not deploy) magically when
docker_targets
is modified, experiment with this! -
This manual action is needed when the MR changes the image, you want to verify the image is good prior to merging.2020-01-30: Not needed.
- 2020-01-17: It appears rules can be used to trigger build job (but not deploy) magically when
The image versions (tags) are not bumped for rebuilds, only when bootstrap.sh
etc change (which is a manual action in MR). This means CICD will automagically contain fixes (bug and security) automatically as Debian pushes them to their repos.
Edited by Melvin Vermeeren