Git

kind: git

Description

Depending on the situation a specific scm block can be provided to manipulate information from a scm repository by either fetching files from a repository or pushing files to them

source

When the scm block is used in a source then it usually means fetching a file from that repository.

condition

When the scm block is used in a condition, then it usually means fetching a file from that repository.

target

When the scm block is used in a target, it usually means pushing file to that repository.

Parameters

NameRequiredDefaultDescription

url

Define Git repository url, username and password can’t be embedded inside the url as it’s not supported, instead use specific username/password settings

username

Define the username used to authenticate with the git repository

password

Define the password used to authenticate with the git repository

branch

master

Define the git branch

user

Define Git user used by git config

email

Define Git email used by the git config

force

false

Run git push using --force option

directory

Default to tmp location, /tmp on linux

Define where to clone the git repository

commitMessage

[T] Customize commit message

CommitMessage

Updatecli uses conventional commits as describe on www.conventionnalcommits.org.
The goal is to add human and machine readable meaning to commit messages

By default, Updatecli generates a commit message using the default type "chore" and split long title message into the body like:


Author: olblak <updatecli@updatecli.io>
Date:   Tue May 4 15:41:44 2021 +0200

    chore: Update key "dependencies[0].version" from file "charts/jenkins/r...

    ... equirements.yaml"

    Made with ❤️️  by updatecli

NameRequiredDefaultDescription

type

chore

Specify commit type

scope

Specify commit scope

footer

Specify commit footer message

title

Override default body message

hideCredit

Remove "Made with ❤️️ by updatecli" from commit message body

body

Override default body message

Authentication

At the moment they are two ways to authentication with a git repository, either using a username/password from the updatecli configuration, or relying on the local ssh-agent. Most of the time, the latter option is more convenient.

Example

Default

sources:
# ...
conditions
# ...
targets:
  id:
    kind: yaml
    spec:
      file: values.yaml
      key: tag
    scm:
      git:
        url: "git repository url"
        branch: "git branch to push changes"
        user: "git user to push from changes"
        email: "git user email to push from change"
        username: "username used to authenticate with the git repository"
        password: "password used to authenticate with the git repository"

CommitMessage

sources:
# ...
conditions
# ...
targets:
  id:
    kind: yaml
    spec:
      file: values.yaml
      key: tag
    scm:
      git:
        url: "git repository url"
        branch: "git branch to push changes"
        user: "git user to push from changes"
        email: "git user email to push from change"
        username: "username used to authenticate with the git repository"
        password: "password used to authenticate with the git repository"
        commitMessage:
          type: "chore"
          scope: "(deps)"

Edit this page on GitHub