Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new commands: execute and push #199

Closed
wants to merge 29 commits into from

Conversation

neomilium
Copy link
Contributor

During our puppet maintenance, we needed to execute some custom scripts on each module then finally push them to our online repositories.

This PR contains these features added in modulesync.

Additionally, it contains few minor fixes.

Commit logs should be self-explained.

Enjoy!

@neomilium neomilium marked this pull request as draft December 15, 2020 23:30
@neomilium neomilium force-pushed the exec-n-push branch 3 times, most recently from a55759e to 672aa80 Compare December 17, 2020 21:30
@neomilium neomilium force-pushed the exec-n-push branch 2 times, most recently from 1972dca to dd090bc Compare December 19, 2020 11:56
neomilium and others added 22 commits December 20, 2020 16:10
According to ruby-git/ruby-git#405, it seems to close the issue reported at ruby-git/ruby-git#326.

This have been merged then released in 1.7.0.

It finally removes the deprecation warning:
lib/monkey_patches.rb:13: warning: Using the last argument as keyword parameters is deprecated
This is now fixed upstream since 2018:
ruby-git/ruby-git#350
This commit provides a new helper class Faker::PuppetModuleRemoteRepo to ease the write of tests when tested operations should (or not) operate on the git repository of a puppet module.

This class provides following features:
 - Fake a remote repository by creating a bare initialization usable using a local remote url (ie. file://)
 - Create basic operations behind the scene using a temporary repo (e.g. write, add and push a file; read a file from a specified branch)
 - Populate the fake remote repo using a basic metadata.json
 - Simulate a read-only repo
 - Change the default branch
 - Count commits between two commit refs
 - Count commits made by an author on all the repo, or a specified branch

Note: All operations are made using "Faker <faker@example.com>" as author and committer.

This commit comes with a tiny Faker module to hold the config (ie. the working directory)
This commit changes to global git config used by Aruba during behavior tests in order to make tests more readable when counting commits made by an author
…po faker

This commit replaces the use of dummy remote repo hosted on GitHub (ie. puppet-test from maestrodev) by fake repos provided by Faker::PuppetModuleRemoteRepo.
Additonally, this commit adds expectations to ensure the remote is, or not depending the test, altered by the running test.
As msync as a default git_base set to GitHub, we need to be sure that there is no online repo usage anymore.
To do so, we choose an invalid namespace/repo couple that ensure we operate on local (fake) repos.
This commit adds a "basic setup" step in order to reduce scenario verbosity and help to focus on important steps
@bastelfreak
Copy link
Member

@neomilium can you rebase this one?

@neomilium
Copy link
Contributor Author

@bastelfreak It need more than a simple rebase… I'll finish to publish bug fixes then will enable rubocop on CI (after fixing most offenses), and finally implement new features (like exec, push, show, etc)

@ekohl
Copy link
Member

ekohl commented Feb 19, 2022

Is this now obsolete and can be closed or is there still work in here that should end up merged?

@neomilium
Copy link
Contributor Author

I close this PR, any related-branches can be deleted: its superseeded by the #244 .

Note that this PR offered a way to made merge-requests, where #244 does not cover it.

@neomilium neomilium closed this Feb 21, 2022
@neomilium neomilium deleted the exec-n-push branch February 21, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants