Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/genaumann/salt-git-formula

Salt - Git Formula
https://github.com/genaumann/salt-git-formula

git salt saltstack saltstack-formula

Last synced: 4 days ago
JSON representation

Salt - Git Formula

Awesome Lists containing this project

README

        

# Salt Git Formula

![GitHub release](https://img.shields.io/github/v/release/genaumann/salt-git-formula)
![lint][lint_badge]
![test][test_badge]

Install and configure git.
Clone and update local git repositories.

## General notes

See the full [SaltStack Formulas installation and usage instructions][install].

See [`example.yml`](example.yml) on how to configure the formula.

If you want to use this formula, please pay attention to the [`FORMULA`](FORMULA) file and/or `git tag`,
which contains the currently released version.
This formula is versioned according to [Semantic Versioning](http://semver.org/).

## Available states

- [`git`](git/init.sls)
- [`git.install`](git/install.sls)
- [`git.repo`](git/repo.sls)
- [`git.config`](git/config/init.sls)
- [`git.config.system`](git/config/system.sls)
- [`git.config.user`](git/config/user.sls)

### `git`

Includes the following states:

- `git.install`
- `git.repo`
- `git.config`

### `git.install`

Installs `git`.

### `git.repo`

Can clone, update and delete a local git repository.
You can use this state to verify a local git repo is checked out on your system.

### `git.config`

Includes the following states:

- `git.config.system`
- `git.config.user`

### `git.config.system`

Ensure a system wide git config is set/unset.

### `git.config.user`

Ensure a user wide git config is set/unset.

## Testing

Linux testing is done with `kitchen-salt`.

All tests and lint jobs are executed in GitHub Actions.

### Requirements

You can test the formula locally after installing the following requirements.

- vagrant
- VirtualBox
- Ruby
- bundler

### Run Test

```bash
bundle install
kitchen list # list all available test instances
kitchen test
```

## Known Errors

- salt state [`git.config_unset`][config_unset] throws an error - see [issue 65715][issue]

## OS support matrix

This formula has been tested under the following operating systems and salt versions.

| OS | 3006.0 | 3006.5 | 3006.6 | 3006.7 | 3007.0 |
| ------------ | ------ | ------------ | ------------ | ------------ | ------------ |
| Debian 12 | :x: | ✅ | ✅ | ✅ | ✅ |
| Ubuntu 22.04 | :x: | ✅ | ✅ | ✅ | ✅ |
| Rocky 9 | :x: | ✅ | ✅ | ✅ | ✅ |
| Fedora 38 | :x: | ✅ | ✅ | ✅ | ✅ |
| OpenSUSE 15 | ✅ | Not released | Not released | Not released | Not released |

[install]: https://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html
[config_unset]: https://docs.saltproject.io/en/latest/ref/states/all/salt.states.git.html#salt.states.git.config_unset
[issue]: https://github.com/saltstack/salt/issues/65715
[lint_badge]: https://github.com/genaumann/salt-git-formula/actions/workflows/lint.yml/badge.svg?branch=main
[test_badge]: https://github.com/genaumann/salt-git-formula/actions/workflows/salt-kitchen.yml/badge.svg?branch=main