podman-gitlab-runner
podman-gitlab-runner copied to clipboard
Add support for services via CI_JOB_SERVICES
Relevant issues for Gitlab
- https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4358
- https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1827
Hey, I was about to build a podman executor for GitLab, glad I found this, I wasn't able to understand what the CI_JOB_SERVICES does could you explain it I'm confused. I'm guessing it's the services option in the YAML file right?
Also, I don't mind helping for anything else too, let me know cause I recently tried to replace docker 1:1 with podman and I got it to work. I've written about it here. https://dev.to/afrocoder/deploying-a-simple-portfolio-with-argo-tunnels-and-containers-for-fun-part-2-2n8l
I will try to run this directly and see if I can find any issues.
Hi @afro-coder, the links above should have examples of what the CI_JOB_SERVICES variable contains when being used. It should contain the information from the services key in the CI config.
Hey @jonasbb is this what this variable is? Seems like Gitlab already exports this $CUSTOM_ENV_CI_JOB_SERVICES
https://docs.gitlab.com/runner/executors/custom.html#services
Do we have to pass these to podman to run the containers before we do the image build?
So docker does this by the --link option I'm assuming? Since podman has pods do we launch these services in a pod? I've never worked on such a thing before so I'm quite confused
Seems like Gitlab already exports this
$CUSTOM_ENV_CI_JOB_SERVICESdocs.gitlab.com/runner/executors/custom.html#services
Yes, that is the same variable. GitLab supports it already, that is what the merge request in the first comment is about.
I have no idea how to implement this. I guess you need to start some more containers, connect them via some network, and tear them down in the opposite order. I am not using services myself, so this is not much of a priority for me.
Yeah, same even I haven't used services. let me see if I can get some examples if I get time I'll work on it