Build and publish Dockerfile stages
Context
https://gitlab.developers.cam.ac.uk/uis/devops/laboratory-allocator/lab-allocator/-/issues/329 required changing the code to use ucam-faas
, meaning that we need to build and publish two containers. There's currently no out-of-the box support for doing this with the current CI templates, meaning that in https://gitlab.developers.cam.ac.uk/uis/devops/laboratory-allocator/lab-allocator/-/merge_requests/278 we had to create a new job releasing the second container.
User story
As a developer
I want to specify which stages of the Dockerfile I want to build
So that I can build and publish multiple Dockerfiles from one repository
Solution
The solution would be if we could specify through a variable which stages to build of the Dockerfile
. Specified stages could be tagged as /<stage_name>
. The publish jobs should also look at this variable and release those stages.
Acceptance criteria
- the default/last build stage should always be published
- Variable available to list stages in Dockerfile for build build and publish and image tags are appended with stage name
Ready for refinement
- There is relevant context to the issue
- There is a user story and/or a problem statement
- The requirements are clear
- There are appropriate acceptance criteria