如何进行DevOps中的git日志信息解读

发布时间:2021-12-01 15:51:31 作者:柒染
来源:亿速云 阅读:101

这篇文章给大家介绍如何进行DevOps中的git日志信息解读,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

DevOps之git日志信息解读

1    版本信息

echo "解读commit数据进行镜像版本指定"$current_git_branch_latest_id=`git rev-parse HEAD`$current_git_branch_latest_short_id=`git rev-parse --short HEAD`$echo current git branch latest commit id=$current_git_branch_latest_id$echo current git branch latest commit short $id=$current_git_branch_latest_short_id# 提交的commit信息$echo $id

2    提交作者

$author=`git log --pretty=format:“%an” $current_git_branch_latest_id -1`$echo $author

3    提交时间

$date=`git log --pretty=format:“%cd” $current_git_branch_latest_id -1`$echo $date

4    提交message

$message=`git log --pretty=format:“%s” $current_git_branch_latest_id -1`$echo $message

5    完整信息

$current_git_branch_latest_id=`git rev-parse HEAD`$current_git_branch_latest_short_id=`git rev-parse --short HEAD`$echo current git branch latest commit id=$current_git_branch_latest_id$echo current git branch latest commit short $id=$current_git_branch_latest_short_id

    版本解析的问题,对于CI/CD系统建设具有十分重要的作用,研制Devops开发流程,实现代码的中间操作,完成对于代码的定制,具有十分重要的作用。

关于如何进行DevOps中的git日志信息解读就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

推荐阅读:
  1. python设置日志信息
  2. 在线日志分析项目解读

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

devops git

上一篇:LINQ查询表达式功能有哪些

下一篇:如何将 Web 框架迁移到 Serverless

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》