Connection to openziti network from job image in Gitlab cicd pipeline

Hello,

I would need to run cypress tests against an environment that is accessible in the openziti network as a service (webserver).
Openziti network is registered through netFoundry

Gitlab job uses a Linux image to run tests. When starting the job, I would first like to connect to the openziti network so that the service (webserver) is accessible. This service will be used as a target for running tests

After the job is finished, this container will disappear and it will be disconnected from the openziti network.

Can you please advise me how I could achieve this. Within the temporary job container (created with gitlab-runner) create a connection to the openziti network ?

Thank you,

Best Regards
Patrik

Hi @lojanp,

Welcome to the community and to OpenZiti!

We actually do something incredibly similar to this for our GitHub (not gitlab) notifications. When a commit, comes in, a PR is opened, an action fails, etc, we get a notification from the failure in GitHub to our chat app which we self-host and is only accessible via an OpenZiti network. (we self-host mattermost, if you're wondering). So when the GitHub action runs, it has to be able to send a message to a web hook. We wrote a GitHub action to accomplish this. It uses the NodeJS SDK but you could do the same with Python or any other language...

We inject the identity into the container from an environment variable/secret. So when the GitHub action comes on line, we write the identity from an environment variable and "just use it".

That answer your question? Cheers