pipelines/components/contrib/git/clone/component.yaml

24 lines
650 B
YAML

name: Git clone
description: Creates a shallow clone of the specified repo branch
metadata:
annotations:
author: Alexey Volkov <alexey.volkov@ark-kun.com>
canonical_location: 'https://raw.githubusercontent.com/Ark-kun/pipeline_components/master/components/git/clone/component.yaml'
volatile_component: "true"
inputs:
- {name: Repo URI, type: URI}
- {name: Branch, type: String, default: master}
outputs:
- {name: Repo dir, type: Directory}
implementation:
container:
image: alpine/git
command:
- git
- clone
- --depth=1
- --branch
- inputValue: Branch
- inputValue: Repo URI
- outputPath: Repo dir