学海无涯
go,go,go

jenkins和gitlab实现自动发布项目-测试上传代码触发自动构建(五)

克隆代码到本地
git clone git@192.168.2.130:test/monitor.git
[root@haproxy1 ~]# git clone git@192.168.2.130:test/monitor.git
Cloning into 'monitor'...
remote: Enumerating objects: 435, done.
remote: Counting objects: 100% (435/435), done.
remote: Compressing objects: 100% (372/372), done.
remote: Total 435 (delta 53), reused 435 (delta 53)
Receiving objects: 100% (435/435), 8.78 MiB | 16.05 MiB/s, done.
Resolving deltas: 100% (53/53), done.


修改代码
sed -i 's#移动能效管理平台#测试1#g' /root/monitor/index.html

上传代码到本地仓库
cd /root/monitor/
git add *
git commit -am '测试自动触发1' 

上传代码到远程仓库
[root@haproxy1 monitor]# git push -u origin master
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 332 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To git@192.168.2.130:test/monitor.git
   f6070e1..9e50f18  master -> master
Branch master set up to track remote branch master from origin.
赞(0) 打赏
未经允许不得转载:YYQ运维技术博客_运维的工作学习之路 » jenkins和gitlab实现自动发布项目-测试上传代码触发自动构建(五)
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

运维devops

联系我们关于本博客

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏