-
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
427 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
30 changes: 30 additions & 0 deletions
30
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,30 @@ | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: http-resolver- | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: http-resolver | ||
taskRef: | ||
resolver: http | ||
params: | ||
# This 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. | ||
# | ||
# In this case it's a GitHub token to be able to fetch the task from | ||
# a private GitHub repository. | ||
- name: url | ||
value: https://raw.githubusercontent.com/owner/private-repository/main/private-task.yaml | ||
- name: http-username | ||
value: git | ||
- name: http-password-secret | ||
value: my-github-token | ||
- 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.