Git SyncUnitTests

Git SyncUnitTests

Certified
Enterprise Edition

Sync Unit Tests from Git to Kestra

This task syncs unit tests from a given Git branch to Kestra. If the delete property is set to true, any unit test available in Kestra but not present in the gitDirectory will be deleted, considering Git as the single source of truth. Check the Version Control with Git documentation for more details.

yaml
type: io.kestra.plugin.ee.git.SyncUnitTests

Sync unit tests from a Git repository. This flow can run on a schedule or on webhook triggers.

yaml
id: sync_unit_tests
namespace: company.team

tasks:
  - id: git
    type: io.kestra.plugin.ee.git.SyncUnitTests
    delete: true
    url: https://github.com/fdelbrayelle/plugin-git-qa
    branch: dev
    username: fdelbrayelle
    password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"

triggers:
  - id: every_hour
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 * * * *"
Properties
Defaultmain

The branch from which unit tests will be synced to Kestra

Whether to clone submodules

Defaultfalse

Whether you want to delete unit tests present in Kestra but not present in Git

It’s false by default to avoid destructive behavior. Use with caution.

Defaultfalse

If true, the task will only output modifications without performing any modification to Kestra. If false (default), all listed modifications will be applied

Defaulttrue

If true (default), the task will fail if the specified directory doesn't exist. If false, missing directories will be skipped

Git config applied after clone

Map of Git config keys and values, applied after clone
Few examples: 
- 'core.fileMode': false -> ignore file permission changes
- 'core.autocrlf': false -> prevent line ending conversion
Default_unit_tests

Directory from which unit tests should be synced

Known hosts file content used for SSH host key verification

OpenSSH known_hosts-formatted content used to verify the remote server's SSH host key. If not set, the system/user known_hosts file is used.

The namespace to sync unit tests to

If set, only unit tests in this namespace and its child namespaces are synced, and with delete enabled only those unit tests are eligible for deletion. If left empty, the task operates across all namespaces (the previous behavior).

Passphrase for privateKey

Password or personal access token

When set, pushes use the identity tied to this credential, so authorName and authorEmail become optional.

Reference (ref) of the pluginDefaults to apply to this task.

SSH private key in PEM format

Use an ECDSA/PEM key whose public part is registered on Git. Example: ssh-keygen -t ecdsa -b 256 -m PEM.

Defaulttrue

Whether to verify the SSH remote server's host key

When true (default), the host key presented by the Git server is verified against knownHosts (if provided) or the system/user known_hosts file, protecting against man-in-the-middle attacks. Only disable this for trusted networks/testing.

Git repository URL

HTTPS or SSH URL used for clone/fetch/push. Supports templating.

Repository username or organization