GitClone

GitClone is a builtin action, you can’t modify it.

Clone a repository into a new directory.

Parameters

Requirements

YAML example

Example of a pipeline using GitClone action:

version: v1.0
name: Pipeline1
stages:
- Stage1
jobs:
- job: Job1
  stage: Stage1
  steps:
  - gitClone:
      branch: '{{.git.branch}}'
      commit: '{{.git.commit}}'
      directory: '{{.cds.workspace}}'
      privateKey: proj-mykey
      url: '{{.git.url}}'

Example

img

img

img

img

Notes

By default, depth is 50 and git clone with --single-branch automatically. So, if you want to do in a step script git diff anotherBranch, you have to set depth to ‘false’.

If there is no user && password && sshkey set in action GitClone, CDS checks on Application VCS Strategy if some auth parameters can be used.