Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions src/main/java/io/kestra/plugin/git/Clone.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@
namespace: company.team

tasks:
- id: clone
type: io.kestra.plugin.git.Clone
url: https://github.com/dbt-labs/jaffle_shop
branch: main
- id: wdir
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/blueprints
branch: main
"""
),
@Example(
Expand All @@ -47,12 +50,15 @@
namespace: company.team

tasks:
- id: clone
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/examples
branch: main
username: git_username
password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
- id: wdir
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/blueprints
branch: main
username: git_username
password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
"""
),
@Example(
Expand All @@ -63,16 +69,19 @@
namespace: company.team

tasks:
- id: clone
type: io.kestra.plugin.git.Clone
url: git@github.com:kestra-io/kestra.git
directory: kestra
privateKey: <keyfile_content>
passphrase: <passphrase>
- id: wdir
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone
type: io.kestra.plugin.git.Clone
url: git@github.com:kestra-io/kestra.git
directory: kestra
privateKey: "{{ secret('SSH_PRIVATE_KEY') }}"
passphrase: "{{ secret('SSH_PASSPHRASE') }}"
"""
),
@Example(
title = "Clone a GitHub repository and run a Python ETL script. Note that the `Worker` task is required so that the Python script shares the same local file system with files cloned from GitHub in the previous task.",
title = "Clone a GitHub repository and run a Python ETL script. Note that the `WorkingDirectory` task is required so that the Python script shares the same local file system with files cloned from GitHub in the previous task.",
full = true,
code = """
id: git_python
Expand All @@ -88,8 +97,9 @@
branch: main
- id: python_etl
type: io.kestra.plugin.scripts.python.Commands
beforeCommands:
- pip install requests pandas > /dev/null
dependencies:
- requests
- pandas
commands:
- python examples/scripts/etl_script.py
"""
Expand Down
Loading