PushUnitTests​Push​Unit​Tests

Commit and push Kestra Unit Tests created from Kestra UI to Git.

yaml
type: "io.kestra.plugin.ee.git.PushUnitTests"

Manually push a single unit test to Git if the input push is set to true.

yaml
id: push_unit_tests
namespace: prod

inputs:
  - id: push
    type: BOOL
    defaults: false

tasks:
  - id: if
    type: io.kestra.plugin.core.flow.If
    condition: "{{ inputs.push == true}}"
    then:
      - id: commit_and_push
        type: io.kestra.plugin.ee.git.PushUnitTests
        unitTests: myTestSuite
        url: https://github.com/fdelbrayelle/plugin-git-qa
        username: fdelbrayelle
        password: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
        branch: dev
        commitMessage: "Add unit tests from {{ flow.namespace ~ '.' ~ flow.id }}"
Properties

The commit author email

If null, no author will be set on this commit.

Default `username`

The commit author name

If null, the username will be used instead.

Default main

The branch to which unit tests should be committed and pushed

If the branch doesn’t exist yet, it will be created. If not set, the task will push the files to the main branch.

Whether to clone submodules

Default Add unit tests from {{ flow.id }} namespace

Git commit message

Default true

Whether to delete flows/files from Git that are no longer present in Kestra

If true (default), files present in Git but not in Kestra will be deleted from the Git repository.

Default false

If true, the task will only output modifications without pushing any file to Git yet. If false (default), all listed files will be pushed to Git immediately.

Git configuration to apply to the repository

text
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 to which unit tests should be pushed

The passphrase for the privateKey

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).

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.

Default **

Which unit tests should be included in the commit

The URI to clone from

The username or organization