Running server project on K8s to test client with Auto DevOps?

How do I run the latest version of my server on the same environment on my Auto DevOps K8s cluster when running the client pipelines for the review environment?

I have a simple Express server in one project, and, within the same group, I have a second project for the React web client. I’m currently using an unmodified Auto DevOps pipeline to run tests on both projects on The server uses the default embedded GitLab Postgres database to hold application resources. The client needs to have the server running on the same cluster for the integration tests. Currently, both projects are deployed to the same K8s cluster for all environments.

I can see many possibilities about how to best configure my client tests so that the server is started before the client tests, but I wanted to check to see if there is a recommended solution that minimizes the changes to the Auto DevOps configurations, while also still allowing me to test locally during development.

I think the solution I’d prefer is for the client tests to start by grabbing the latest server container from the GitLab registry for the project (or group) from the master branch and start it as a service. I’d expect this requires creating at .gitlab-ci.yml, but was hoping it might already be a part of the default Auto DevOps?

Once I get testing working both locally, and within the review environment, I will move on to configure the staging and production environments. I would assume that since both projects deploy to the same K8s cluster, that they can be individually deployed, and then should both be running within the same environments, since those environments (staging and production) would be shared by all projects within the Group? I would expect the server to come up as a service within the same environment using the project slug as the service’s host address? IOW, the “run the server” stage required for the review environment, would need to be configured differently for both staging and production?

This feels like a common configuration – with a single server and client as separate projects within the same group. Is there any existing documentation on best practices? Ideally, I’d love to see this as an opinionated setup in the default Auto DevOps environment.


Dan Wexler