I've got a rather simple build with some minor complications that I'm stumped on how to orchestrate.
My Jenkins/Bitbucket are located on an isolated network. Part of my build needs access to the internet. To facilitate this I have a Jenkins remote agent running on a different network with a firewall rule allowing it to connect to the Jenkins master.
Similarly I have a Bitbucket mirror located on the same network as the remote agent.
So Jenkins primary can talk to Bitbucket primary. Jenkins agent can talk to Bitbucket mirror.
My build is correctly run using declarative pipeline script and has been working well. Most of my stages are bound to the agent and the git checkouts happen from the mirror. The final image is stash/unstashed back to the primary and build wraps up.
Now I want to leverage some of the new functionality with Bitbucket 7.6 and the Jenkins plugin, application link, builds dashboard, etc. So far as I can determine from experimenting and the documentation this requires a seemingly minor change to using a Jenkinsfile.
I added my script to the repo as Jenkinsfile, configured by build pipeline as file/SCM, setup all the proper values and it fails... Now all of the git checkouts are happening against the primary, and my remote agent can't talk to the primary, only the mirror.
My Jenkinsfile calls for the checkout to be done on the remote in it's own stage and specifies the mirror directly, but it's trying to checkout the repo from the primary and failing the build.
If I configure the SCM to use the mirror I suspect the build won't even start because then it will attempt to checkout the Jenkinsfile from the mirror and that's not reachable from the network the Jenkins primary is on (only the primary bitbucket server can reach the mirror).
It feels like I'm close, I just don't know how to split up the git checkouts correctly.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events