-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the ability to pass credentials to the HTTP resolver when fetching the URL. This let's for example to fetch tasks from SCM private repositories on other SCM providers than configured with the git resolver. Fixes #7296 Signed-off-by: Chmouel Boudjnah <[email protected]>
- Loading branch information
Showing
7 changed files
with
432 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
examples/v1/pipelineruns/beta/http-resolver-credentials.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This http resolver example will uses a username and password to access the | ||
# URL. | ||
# | ||
# http-password-secret is a Kubernetes secret containing the | ||
# password in the same namespace where this PipelineRun runs. | ||
--- | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: my-secret | ||
stringData: | ||
token: "token" | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: http-resolver- | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: http-resolver | ||
taskRef: | ||
resolver: http | ||
params: | ||
- name: url | ||
value: https://api.hub.tekton.dev/v1/resource/tekton/task/tkn/0.4/raw | ||
- name: http-username | ||
value: git | ||
- name: http-password-secret | ||
value: my-secret | ||
- name: http-password-secret-key | ||
value: token | ||
params: | ||
- name: ARGS | ||
value: ["version"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.