Add additional detail in commit

This commit is contained in:
Joshua Boniface 2022-10-25 21:03:30 +00:00
parent 884867989a
commit 96ac9bcb75
2 changed files with 4 additions and 2 deletions

View File

@ -76,7 +76,7 @@ def run_bootstrap(config, cspec, cluster, nodes):
logger.info("{}: {}".format(r.status, r.rc)) logger.info("{}: {}".format(r.status, r.rc))
logger.info(r.stats) logger.info(r.stats)
if r.rc == 0: if r.rc == 0:
git.commit_repository(config) git.commit_repository(config, f"Generated files for cluster '{cluster.name}'")
git.push_repository(config) git.push_repository(config)
notifications.send_webhook(config, "success", f"Cluster {cluster.name}: Completed Ansible bootstrap") notifications.send_webhook(config, "success", f"Cluster {cluster.name}: Completed Ansible bootstrap")
else: else:

View File

@ -76,7 +76,7 @@ def pull_repository(config):
logger.info("Completed repository synchonization") logger.info("Completed repository synchonization")
def commit_repository(config): def commit_repository(config, message="Generic commit"):
""" """
Commit uncommitted changes to the Ansible git repository Commit uncommitted changes to the Ansible git repository
""" """
@ -94,6 +94,8 @@ def commit_repository(config):
g.commit( g.commit(
"-m", "-m",
"Automated commit from PVC Bootstrap Ansible subsystem", "Automated commit from PVC Bootstrap Ansible subsystem",
"-m",
message,
author="PVC Bootstrap <git@pvcbootstrapd>", author="PVC Bootstrap <git@pvcbootstrapd>",
env=commit_env, env=commit_env,
) )