Build client and runner images in CI
What does this merge request do and why?
To improve usability, we can automatically publish prompt-library, this way a user doesn't need clone the repo and build the docker image themselves. A user can simply pull the client image from the project container registry and kickoff a dataflow job.
In this MR, we introduce 2 CI jobs to automatically publish prompt-library when we tag a commit:
- build-client-image: build and push the client image to gitlab container registry.
- build-runner-image: build and push the client image to google artifacts registry.
When we tag a commit, both images will be built with the same tag and pushed to their respective registries.
Several admin things are made ready for this to happen:
- A google service account
gitlab-ci@dev-ai-research-0e2f8974.iam.gserviceaccount.com
was created and was given the "Artifact Registry Writer" role. - A CI variable called
GOOGLE_SERVICE_ACCOUNT
was created that contains the key of the above service account.
How to set up and validate locally
I've tagged prompt-library as a test run (also as the first release): https://gitlab.com/gitlab-org/modelops/ai-model-validation-and-research/prompt-library/-/tags/1.0.
Please check out both gitlab and google registries and you should see the 1.0 version of the images.
Merge request checklist
-
I've ran the affected pipeline(s) to validate that nothing is broken. -
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.