I have a Gerrit container that I am trying to configure to use with a Jenkins container. I have a repo set up for a program called 'Lotto' .
When I go to repositories and copy the clone command the output shows as :
That's obviously not going to work with Jenkins.. Both containers are on a container network called "ddn-container-network"
with the two container in it:
"Containers": {
"7c7d0ce1769d828a6fb669e490cc54bc1bd48166980ea07b1b0e09d6a105baaa": {
"Name": "dkr-gerrit-1",
"EndpointID": "7da88baaf2f101db04ab2a779bc94b6e0ffe805e590c3e22737b6692ce46f144",
"MacAddress": "02:42:ac:14:00:02",
"IPv4Address": "
172.20.0.2/16",
"IPv6Address": ""
},
"c81567f79c14017d410cb4f348d87a2ccff9c80399e0b228b37f87d90f146b01": {
"Name": "dkr-jenkins-1",
"EndpointID": "2f67a4e50cc67215d88fd8ae85c8c08aae50205fac24c34d402591125411c16d",
"MacAddress": "02:42:ac:14:00:03",
"IPv4Address": "
172.20.0.3/16",
"IPv6Address": ""
}
In the Jenkins, I have successful builds with this console output - NOTE the proper ip address is used and not the Container ID:
Started by user <USER>
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/Demo
The recommended git tool is: NONE
using credential c3c09c9d62ba6bc8a8e0a2d4510e737626d39eed
> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/Demo/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url http://10.36.16.9:8081/Lotto # timeout=10
Fetching upstream changes from http://10.36.16.9:8081/Lotto
> git --version # timeout=10
> git --version # 'git version 2.30.2'
using GIT_ASKPASS to set credentials Gerrit - Git for Lotto
> git fetch --tags --force --progress -- http://10.36.16.9:8081/Lotto +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/main^{commit} # timeout=10
Checking out Revision 4db74f75b0d8e639eac2e1fa0454a70339cd8099 (refs/remotes/origin/main)
> git config core.sparsecheckout # timeout=10
> git checkout -f 4db74f75b0d8e639eac2e1fa0454a70339cd8099 # timeout=10
Commit message: "learning to use Gerrit"
> git rev-list --no-walk 4db74f75b0d8e639eac2e1fa0454a70339cd8099 # timeout=10
Finished: SUCCESS
So Jenkins can build it but I cannot clone it ..?
Any thoughts on how I can clone the repo would be helpful.
Thanks, Chuck