-
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.
Support overriding the SCM type and server URL
When using the git resolver it was only possible to use one single provider across cluster. If the user wanted to mix different providers to fetch the task from they would not have been able to do so. With this change we now support overriding the SCM type and server URL as a parameters in the PipelineRun for the user to pass. Signed-off-by: Chmouel Boudjnah <[email protected]>
- Loading branch information
1 parent
d7f8c99
commit 158e13e
Showing
5 changed files
with
126 additions
and
20 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
47 changes: 47 additions & 0 deletions
47
examples/v1/pipelineruns/no-ci/git-resolver-custom-apiurl.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,47 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: git-resolver- | ||
spec: | ||
workspaces: | ||
- name: output # this workspace name must be declared in the Pipeline | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce # access mode may affect how you can use this volume in parallel tasks | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
pipelineSpec: | ||
workspaces: | ||
- name: output | ||
tasks: | ||
- name: task1 | ||
workspaces: | ||
- name: output | ||
taskRef: | ||
resolver: git | ||
params: | ||
- name: url | ||
value: https://github.com/tektoncd/catalog.git | ||
- name: pathInRepo | ||
value: /task/git-clone/0.7/git-clone.yaml | ||
- name: revision | ||
value: main | ||
# my-secret-token should be created in the namespace where the | ||
# pipelinerun is created and contain a GitHub personal access | ||
# token in the token key of the secret for the GitHub endpoint | ||
# where the serverURL is configured to | ||
- name: token | ||
value: my-secret-token | ||
- name: tokenKey | ||
value: token | ||
- name: serverURL | ||
value: https://github.my-company.com | ||
- name: scmType | ||
value: github | ||
params: | ||
- name: url | ||
value: https://github.com/tektoncd/catalog | ||
- name: deleteExisting | ||
value: "true" |
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