This adds 2 new config options:
- gitfs_disable_saltenv_mapping - This allows a user to disable the environment mapping logic and rely solely on per-saltenv configuration
- gitfs_ref_types - This allows individual ref types to be ignored
It also includes a performance improvement in retrieving tree objects
matching the desired ref name. Before, we would iterate through the
different refs and check if the name matched the desired ref's name.
Now we just check for a head/tag ref based on the ref path in the
gitdir (e.g. refs/remotes/origin/master or refs/tags/v1.2.3). This
prevents us from needlessly iterating through all refs until a match is
found, which does not scale well when the number of branches and tags is
larger.
Depending on how you read it, the previous version may have suggested
that all of the per-remote parameters are new in Oxygen. This makes it
more explicit that the all_saltenvs param is the only one new to Oxygen.
pygit2 was rebuilt, but libgit2 still needs a rebuild. I opened an
upstream bug report this morning, this updates the docs to reflect the
current status of this upstream issue.
* Add config params for custom refspecs
* Add exceptions for errors encountered modifying git config
* Make the refspecs a configurable parameter
* Make refspecs a per-remote parameter
* Update master config template to include custom refspecs opts
* Add documentation for new config params
* Update GitFS walkthrough with a section on custom refspecs
* Remove dulwich support from salt.utils.gitfs
Dulwich still lacks important features, including (but not limited to)
the following:
- Lack of the necessary support for checking out a ref needed for
git_pillar/winrepo support
- No support in its config objects for multivar git config items, making
it impossible to detect when repos have multiple refspecs set for a
given git remote
Given this information, and the fact that it trails as a distant third
to Pygit2 and GitPython, Salt will cease to support Dulwich as a git
interface moving forward.
* Excise references to dulwich from documentation
* Add mention of custom refspecs to Nitrogen release notes
* Add gitfs_refspecs to mocked opts in gitfs integration tests
Also remove dulwich from unit tests
* Add information about opts argument not being intended for CLI use
Fixes#36475
By adding the "bash" argument, we avoid the following error and the docs
will display appropriately:
```
/root/SaltStack/salt/doc/topics/tutorials/gitfs.rst:918: ERROR: Error in "code-block" directive:
1 argument(s) required, 0 supplied.
.. code-block::
Cmnd_Alias SALT_GIT_HOOK = /bin/salt-call event.fire_master update salt/fileserver/gitfs/update
Defaults!SALT_GIT_HOOK !requiretty
ALL ALL=(root) NOPASSWD: SALT_GIT_HOOK
```
* Add warning about AWS flagging of nmap usage
Also improve the verification examples overall, and add a note about the
fingerprint display difference beginning in OpenSSH 6.8.
* Remove "as root"
For some reason, when I was running the test in the example, I wasn't
getting the script output for the host key, unless I ran as root. Don't
know why this was the case but I can't reproduce it now. Removing this
as it is not accurate.
Also added a port number to the example as well since it speeds up the
nmap command.
* Add top file config params to minion config file documentation
* Improve documentation on top file merging behavior
* Add recommendation on changing top_file_merging_strategy
* Improve the log message warning of multiple top files
Because the hook is run as the user performing the push,
salt-call will typically fail. This documentation change
uses sudo for salt-call, and provides a sudo policy that
permits any user to run the post-recieve hook.