mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
As I understand it, `master` is the implicit default on the API side. But there's been an effort to use `main` or other names, xref https://sfconservancy.org/news/2020/jun/23/gitbranchname/ The client will clone the default branch, but this can cause problems around things like webhooks because the build API object is still watching for the implicit `master`. Make this explicit, in the hopes that people know to change it to `main` when they need to.
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * builds/creating-build-inputs.adoc
|
|
|
|
[id="builds-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 build configuration. 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"
|
|
ref: "master"
|
|
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 do not leverage the HTTP or HTTPS proxy defined in the `BuildConfig`. The Git plug-in only uses the proxy configured in the Jenkins UI at the Plugin Manager panel. This proxy is then used for all git interactions within Jenkins, across all jobs.
|
|
====
|
|
|
|
[role="_additional-resources"]
|
|
.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].
|