Page MenuHomePhabricator

Jenkins: Use web proxy to let git access repositories on from GitHub (e.g. submodules)
Closed, ResolvedPublic

Description

The translatewiki repository relies on git submodules hosted on github using either http or the git protocol:

https://github.com/puppetlabs/puppetlabs-apt.git
git://github.com/tPl0ch/puppet-composer.git

Since lanthanum does not have direct access to internet, whenever the translatewiki-puppet-validate job is run on that host, the clone of submodules fails:

https://integration.wikimedia.org/ci/job/translatewiki-puppet-validate/1765/console

I have added a http_proxy parameter which still fail the build:

https://integration.wikimedia.org/ci/job/translatewiki-puppet-validate/1768/console

We need an addition https_proxy parameter:

https://integration.wikimedia.org/ci/job/translatewiki-puppet-validate/1769/console

But then that fails fetching git://github.com..

In man git-config, there seems to be possibility to set proxy for both HTTP and GIT protocols and we can even make them on a per host/URL basis!

Example:

; Proxy settings
[core]
        gitproxy=proxy-command for kernel.org
        gitproxy=default-proxy ; for all the rest

; HTTP
[http]
        sslVerify
[http "https://weak.example.com"]
        sslVerify = false
        cookieFile = /tmp/cookie.txt

The jobs are running as jenkins-slave user. That user has a .gitconfig which is generated by puppet. So potentially we can figure out the proper parameters and have them populated by puppet.


Version: wmf-deployment
Severity: normal

Details

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:01 AM
bzimport set Reference to bz60164.
bzimport added a subscriber: Unknown Object (MLST).

Change 108021 had a related patch set uploaded by Hashar:
tie translatewiki-puppet-validate to gallium

https://gerrit.wikimedia.org/r/108021

Change 108021 merged by jenkins-bot:
tie translatewiki-puppet-validate to gallium

https://gerrit.wikimedia.org/r/108021

As a workaround, I have forced translatewiki-puppet-validate to run only on gallium which has direct access to internet.

Do these still run on the production slaves? If so, what would it take to have them run on the labs slaves?

Change 184644 had a related patch set uploaded (by Hashar):
Move *puppet-validate jobs to labs

https://gerrit.wikimedia.org/r/184644

Patch-For-Review

I have made translatewiki-puppet-validate (which has github repos as submodule) to run on labs slaves. It fetches the submodules and pass.

hashar claimed this task.

Change 184644 merged by jenkins-bot:
Move *puppet-validate jobs to labs

https://gerrit.wikimedia.org/r/184644