def get_commit_clamped(length=7): commit_hash = environment.get_git_commit() if len(str(commit_hash)) > length: commit_hash = commit_hash[:length] return commit_hash
def get_build_environment(self, data): return { "gitBranch": environment.get_git_branch(), "gitCommit": environment.get_git_commit(), "gitUrl": environment.get_git_url(), "buildNumber": environment.get_build_number(), "buildDate": environment.get_time(), "version": data[pipeline_data.PACKAGE_JSON]["version"] }
def get_build_environment(self, data): return { "gitBranch": environment.get_git_branch(), "gitCommit": environment.get_git_commit(), "gitUrl": environment.get_git_url(), "jenkinsBuild": environment.get_build_number(), "jenkinsBuildDate": environment.get_time(), "dockerName": data[pipeline_data.IMAGE_NAME], "dockerVersion": data[pipeline_data.IMAGE_VERSION], "dockerImage": image_version_util.prepend_registry( image_version_util.get_image(data)) }