CICD 持续集成与持续交付——gitlab

部署

虚拟机最小需求:4G内存 4核cpu

下载:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

安装依赖性

复制代码
[root@cicd1 ~]# yum install -y curl policycoreutils-python openssh-server perl

[root@cicd1 ~]# yum install -y gitlab-ce-15.9.3-ce.0.el7.x86_64.rpm

[root@cicd1 ~]# cd /etc/gitlab/

[root@cicd1 gitlab]# vim gitlab.rb

自动化部署

复制代码
[root@cicd1 gitlab]# gitlab-ctl reconfigure
复制代码
[root@cicd1 ~]# gitlab-ctl status

登录

用户:root

初始密码: cat /etc/gitlab/initial_root_password

语言设置

修改密码,初始密码24小时后过期

新建项目

添加密钥

克隆项目

复制代码
[root@cicd1 ~]# git clone git@192.168.92.21:root/demo.git

[root@cicd1 ~]# cd demo/

[root@cicd1 demo]# ls

[root@cicd1 demo]# git remote -v
复制代码
[root@cicd1 demo]# echo www.westos.org > index.html

[root@cicd1 demo]# ls

[root@cicd1 demo]# git add  index.html

[root@cicd1 demo]# git commit -m "add index.html"

[root@cicd1 demo]# git push -u origin main
相关推荐
snow@li3 小时前
服务器运维:K3S 下 Jenkins ↔ GitLab 的 CI/CD 闭环 / 访问成功
运维·gitlab·jenkins
dongsdh15 小时前
部署python
大数据·elasticsearch·搜索引擎
听到微笑20 小时前
Elasticsearch 如何存储与检索海量向量
数据库·elasticsearch
lbb 小魔仙20 小时前
Python 项目 CI/CD 实战:用 GitHub Actions 搭建自动化测试、覆盖率与发布流水线
python·ci/cd·github
知福致福1 天前
【技术复盘】Git 分支污染与提交污染事故排查与解法
大数据·git·elasticsearch
cindershade1 天前
报错之后,谁来证明它属于这次发布?前端错误治理的证据链设计
ci/cd·前端工程化
敲代码的嘎仔1 天前
互动问答系统实战:两级评论模型、ES 搜索集成、Caffeine 多级缓存全记录
java·开发语言·数据库·elasticsearch·缓存·mybatis·高并发
迷途呀2 天前
CI/CD 自动化部署实践:让代码提交后自动上线
linux·运维·nginx·ci/cd·自动化
彧azz2 天前
Git 入门实操实例:从安装到远程仓库全流程
大数据·笔记·git·学习·elasticsearch