Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
50.6M

Clone a Git repository git-clone

Clone a Git repository with Codefresh's built in Git provider integration.

arguments

  • credentials - Credentials to access the repository, if it requires authentication. It can an object containing username and password fields. Credentials are optional if you are using the built-in git integrations.
  • depth - Create a shallow clone with a history truncated to the specified number of commits.
  • exclude_blobs - (boolean) Filter out all blobs (file contents). The default value is False.
  • git - The name of the git integration you want to use. If left empty, Codefresh will attempt to use the git provider that was used during account sign-up. Note that this might have unexpected results if you are changing your Git integrations.
  • repo - path of the repository without the domain name in the form of my_username/my_repo
  • revision - The revision of the repository you are checking out. It can be a revision hash or a branch name. The default value is master.
  • working_directory - The directory to which the repository is cloned. It can be an explicit path in the container’s file system, or a variable that references another step. The default value is ${{main_clone}}.
    Clone:
  title: Running docker image
  type: git-clone
  arguments:
    repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    git: github
    revision: '${{CF_REVISION}}'

  
github.com
Codefresh INC
Feb 14, 2024