1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/builds-using-proxy-git-cloning.adoc

33 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * builds/creating-build-inputs.adoc
[id="build-using-proxy-git-cloning_{context}"]
= Using a proxy
If your Git repository can only be accessed using a proxy, you can define the proxy to use in the `source` section of the `BuildConfig`. You can configure both an HTTP and HTTPS proxy to use. Both fields are optional. Domains for which no proxying should be performed can also be specified in the `NoProxy` field.
[NOTE]
====
Your source URI must use the HTTP or HTTPS protocol for this to work.
====
[source,yaml]
----
source:
git:
uri: "https://github.com/openshift/ruby-hello-world"
httpProxy: http://proxy.example.com
httpsProxy: https://proxy.example.com
noProxy: somedomain.com, otherdomain.com
----
[NOTE]
====
For Pipeline strategy builds, given the current restrictions with the Git plug-in for Jenkins, any Git operations through the Git plug-in will not leverage the HTTP or HTTPS proxy defined in the `BuildConfig`. The Git plug-in only will use the proxy configured in the Jenkins UI at the Plugin Manager panel. This proxy will then be used for all git interactions within Jenkins, across all jobs.
====
.Additional resources
* You can find instructions on how to configure proxies through the Jenkins UI at link:https://wiki.jenkins-ci.org/display/JENKINS/JenkinsBehindProxy[JenkinsBehindProxy].