Add a git task to clone a repository without PipelineResource#123
Add a git task to clone a repository without PipelineResource#123tekton-robot merged 1 commit intotektoncd:masterfrom
Conversation
178dc52 to
ee1d545
Compare
This is part of documenting and providing Tasks in the catalog that would help user not using PipelineResource. Related to [tektoncd/pipeline#1369](tektoncd/pipeline#1369). Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
ee1d545 to
72e7446
Compare
| workingdir: /workspace/src/ | ||
| command: | ||
| - /bin/bash | ||
| - -c |
|
one minor nit |
| apiVersion: tekton.dev/v1alpha1 | ||
| kind: Task | ||
| metadata: | ||
| name: fetch-git |
There was a problem hiding this comment.
what about calling this by the git action? i.e: git-pull
| workingdir: /workspace/src/ | ||
| command: | ||
| - /ko-app/git-init | ||
| args: |
There was a problem hiding this comment.
Can we add the parameter -depth and default to 1 this way it can be use in git clone --branch master --depth 1 and download 10KB instead of the whole history 100MB of the repo?
cc @vdemeester
There was a problem hiding this comment.
@csantanapr yeah we will add support for --depth. We need to update this yaml to use something else than git-init, using the git binary itself and script most likely.
| value: github.com/tektoncd/pipeline | ||
| - name: cat-readme | ||
| taskRef: | ||
| name: echo-readme |
| name: fetch-git | ||
| params: | ||
| - name: url | ||
| value: github.com/tektoncd/pipeline |
There was a problem hiding this comment.
I'm running into below error when trying to play around with this locally:
Error running git [remote add origin github.com/tektoncd/pipeline]: exit status 128\nfatal: remote origin already exists.
Is this something special with git-init command?
|
Let's merge this and address the other cleanups/improvement in a follow-up review /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chmouel The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
This is part of documenting and providing Tasks in the catalog that
would help user not using PipelineResource.
Related to tektoncd/pipeline#1369.
Part of #95
Signed-off-by: Vincent Demeester vdemeest@redhat.com
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.