1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00

adding proxy settings to git-clone

Adding httpsProxy, httpProxy, and noProxy in git-clone task.
This commit is contained in:
Priti Desai 2020-03-19 11:10:06 -07:00 committed by tekton-robot
parent 20d449cd43
commit 13037cbd0d
2 changed files with 19 additions and 0 deletions

View File

@ -38,6 +38,9 @@ as well as
* **sslVerify**: defines if http.sslVerify should be set to true or false in the global git config (_default_: true)
* **subdirectory**: subdirectory inside the "output" workspace to clone the git repo into (_default:_ src)
* **deleteExisting**: clean out the contents of the repo's destination directory if it already exists before cloning the repo there (_default_: false)
* **httpProxy**: git HTTP proxy server for non-SSL requests
* **httpsProxy**: git HTTPS proxy server for SSL requests
* **noProxy**: git no proxy - opt out of proxying HTTP/HTTPS requests
### Results

View File

@ -35,6 +35,18 @@ spec:
description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there
type: string
default: "false"
- name: httpProxy
description: git HTTP proxy server for non-SSL requests
type: string
default: ""
- name: httpsProxy
description: git HTTPS proxy server for SSL requests
type: string
default: ""
- name: noProxy
description: git no proxy - opt out of proxying HTTP/HTTPS requests
type: string
default: ""
results:
- name: commit
description: The precise commit SHA that was fetched by this Task
@ -63,6 +75,10 @@ spec:
cleandir
fi
test -z "$(inputs.params.httpProxy)" || export HTTP_PROXY=$(inputs.params.httpProxy)
test -z "$(inputs.params.httpsProxy)" || export HTTPS_PROXY=$(inputs.params.httpsProxy)
test -z "$(inputs.params.noProxy)" || export NO_PROXY=$(inputs.params.noProxy)
/ko-app/git-init \
-url "$(inputs.params.url)" \
-revision "$(inputs.params.revision)" \