Resolve "Images shouldn't publish on ci commet ref master"
Closes #41 (closed)
Code Changes
- creates one template for publishing that applies to MRs and master:
docker_base
- creates prod and mr docker publish templates
- changes the build jobs to MR publish jobs
- renames the publish jobs to prod publish jobs
Commented out Code Changes
- creates an
mr_delete
template that is manual and can delete images - adds two delete jobs, one for each image.
These are commented out as rmi
doesn't remove it from the registy. Will follow up in separate issue
Steps to confirm
- Used the linter to validate the yaml
- Ran all the jobs in the MR
- Tested by switching the refs to master and watching the jobs disappear from the MR.
Changes
The problem this was trying to solve was that we normally pull the image from latest
. When I added the CI job originally to be able to test a new image in the analytics repo it was pushing to the branch name. On master the job was then running for both latest
and master
. This should fix all that.