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

Clean up sensitive data from the logs #679

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions nautobot_golden_config/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ def run(self, *args, **data):

# Commit / Push each repo after job is completed.
for intended_repo in intended_repos:
self.logger.debug("Push new intended configs to repo %s.", intended_repo.base_url)
# TODO: Should this not point to non-nautobot.core import
# We should ask in nautobot core for the `from_url` constructor to be it's own function
git_info = get_repo_from_url_to_path_and_from_branch(intended_repo)
self.logger.debug("Push new intended configs to repo %s.", git_info.from_url)
intended_repo.commit_with_added(f"INTENDED CONFIG CREATION JOB - {now}")
intended_repo.push()

Expand Down Expand Up @@ -173,7 +176,10 @@ def run(self, *args, **data):

# Commit / Push each repo after job is completed.
for backup_repo in backup_repos:
self.logger.debug("Pushing Backup config repo %s.", backup_repo.base_url)
# TODO: Should this not point to non-nautobot.core import
# We should ask in nautobot core for the `from_url` constructor to be it's own function
git_info = get_repo_from_url_to_path_and_from_branch(backup_repo)
self.logger.debug("Pushing Backup config repo %s.", git_info.from_url)
backup_repo.commit_with_added(f"BACKUP JOB {now}")
backup_repo.push()

Expand Down