SyncUnitTests
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.
type: "io.kestra.plugin.ee.git.SyncUnitTests"
Examples
Sync unit tests from a Git repository. This flow can run on a schedule or on webhook triggers.
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
branch string
main
The branch from which unit tests will be synced to Kestra
cloneSubmodules booleanstring
Whether to clone submodules
delete booleanstring
false
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.
dryRun booleanstring
false
If true
, the task will only output modifications without performing any modification to Kestra. If false
(default), all listed modifications will be applied.
failOnMissingDirectory booleanstring
true
If true
(default), the task will fail if the specified directory doesn't exist. If false
, missing directories will be skipped.
gitConfig object
Git configuration to apply to the repository
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
gitDirectory string
_unit_tests
Directory from which unit tests should be synced
passphrase string
The passphrase for the privateKey
password string
The password or Personal Access Token (PAT) -- when you authenticate the task with a PAT, any flows or files pushed to Git from Kestra will be pushed from the user associated with that PAT. This way, you don't need to configure the commit author (the authorName
and authorEmail
properties).
privateKey string
PEM-format private key content that is paired with a public key registered on Git
To generate an ECDSA PEM format key from OpenSSH, use the following command: ssh-keygen -t ecdsa -b 256 -m PEM
. You can then set this property with your private key content and put your public key on Git.
url string
The URI to clone from
username string
The username or organization