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

GitLab Support #47

Closed
minitriga opened this issue Jun 17, 2020 · 4 comments
Closed

GitLab Support #47

minitriga opened this issue Jun 17, 2020 · 4 comments

Comments

@minitriga
Copy link
Contributor

Add support for gitlab.

@jeremyschulman
Copy link
Owner

@minitriga - From what I can tell so far, netcfgbu should work "AS IS" with GitLab; but I have not yet tested this myself.

The netcfgbu tool uses the git tool locally installed on your system; i.e. it does not make API calls to GitHub directly. Given that implementation I would expect netcfgbu to "just work".

Perhaps you could test this out? If it doe work as-is, perhaps it would be better to replace in the configuration file the use of [[github]] to simply [[git]] to make it suitable for both github and gitlab.

Thoughts?

@minitriga
Copy link
Contributor Author

@jeremyschulman. Okay just tested it out and looks good:

image

Changing the configuration file from [[github]] to [[git]] would be nice.

Do you think it would be worth adding a command to the CLI so that netcfgbu backup and netcfgbu vcs save is run in one command?

How are you planning to run this tool on a schedule? Cron job?

I'm currently doing this by using a Cron Job with a shell script... Not sure if its the best solution... Might containerize it somewhat.

#!/bin/bash

COMMAND="netcfgbu backup"
echo "Backing Up Configs ($COMMAND)..."
eval $COMMAND || exit 1

COMMAND="netcfgbu vcs save"
echo "Save Backedup Configs ($COMMAND)..."
eval $COMMAND || exit 1

@jeremyschulman
Copy link
Owner

@minitriga - thank you for taking the time to verify netcfgbu works with gitlab! I will open a new issue to track the change from [[github]]`` to [[git]]` and add that to the v0.4.0 project release.

There is a purpose for separating the steps of backup and save. This separation allows the User to determine what is backed up using the --limit and --exclude options before performing the save. For example, the User may make multiple calls to backup before performing the one save. Hope that makes sense.

Regarding the scheduling question; yes I am also using a cron+shell-script approach.

@jeremyschulman
Copy link
Owner

Created #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants