gerrit container uses Image ID for a hostname?

66 views
Skip to first unread message

Charles Forry

unread,
Dec 11, 2023, 3:03:22 PM12/11/23
to Repo and Gerrit Discussion
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

syntonyze

unread,
Dec 11, 2023, 4:46:01 PM12/11/23
to Charles Forry, Repo and Gerrit Discussion
On Mon, 11 Dec 2023 at 21:03, Charles Forry <charle...@gmail.com> wrote:
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 :

Which docker image are you using?
Dockerized gerrit generally uses an entrypoint that will default the canonical host name to the docker id unless otherwise specified. [1]
Setting the `CANONICAL_WEB_URL` environment variable should help.

Tony

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/e2931d37-c764-4d29-b7c6-6fa529555072n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages