I have the following step in my pipeline:
- step:
deployment: Client
script:
- apt-get stuff
- ssh -N -L 4430:some_ip:4430 some_host &
- sleep 10 # Give SSH tunnel some time to establish
- pipe: docker://tomerh2001/gitlab-merge-request-pipe:latest
variables:
GITLAB_TOKEN: $GITLAB_TOKEN
I am trying to understand which IP/Host I need to specify for the pipe to access the tunnel from the main flow. I tried `host.docker.internal` but that doesn't work.
For context, I have locally replicated the docker run command that bitbucket creates to run the pipe, and it works locally with host.docker.internal when I run the docker image of the custom pipe
I guess that in the pipeline context, the host.docker.internal resolves the host of the docker service itself? And since the SSH tunnel was created inside the pipeline (I.e. a docker container), would I need to somehow find the IP of that container in order to access the tunnel?
My goal is to access the tunnel from within the pipe. Any help will be greatly appreciated!