You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have the following step in my pipeline:
- step:deployment: Clientscript:- apt-get stuff- ssh -N -L 4430:some_ip:4430 some_host &- sleep 10 # Give SSH tunnel some time to establish- curl -k https://localhost:4430 # Works- pipe: docker://tomerh2001/gitlab-merge-request-pipe:latestvariables:GITLAB_TOKEN: $GITLAB_TOKENGITLAB_URL: https://host.docker.internal:4430
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!
What error do you get when you run the pipe?
Have you tried using http://host.docker.internal:4430 (instead of https)?
I'm not sure about the tunneling, but if I start an HTTP server on the build container on port 8000, the curl command works from within the pipe container if I use curl http://host.docker.internal:8000
I was also curious, why are you using an SSH tunnel instead of the GitLab URL in the GITLAB_URL variable?