kestra-io / plugin-git

Apache License 2.0
3 stars 4 forks source link

New `git.Reconcile` task #17

Closed anna-geller closed 11 months ago

anna-geller commented 12 months ago

Feature description

Proposed task: the task must ensure that it will not delete itself!

The task should infer the namespace from the flow.

id: sync_from_git
namespace: prod

tasks:
  - id: git
    type: io.kestra.plugin.git.Reconcile # flows and namespace files
    url: https://github.com/kestra-io/scripts
    branch: main
    username: anna-geller
    password: "{{ secret('GITHUB_PAT') }}"
    gitDirectory: your_git_dir # optional, otherwise all files
    namespaceFilesDirectory: your_namespace_files_location # optional, otherwise root
    dryRun: true  # if true, print the output of what files will be added/modified or deleted 
# based on Git version without overwriting namespace files yet

triggers:
  - id: schedule
    type: io.kestra.core.models.triggers.types.Schedule
    cron: "*/1 * * * *"
    # cron: "*/30 * * * * *" # every 30 seconds

Benefits: