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
相关推荐
️学习的小王9 小时前
Git项目提交忽略文件怎么做?以Python项目为例,详解.gitignore
git·python·elasticsearch
Elasticsearch9 小时前
安装 Elasticsearch
elasticsearch
南梦浅10 小时前
GitLab 企业级实操手册:从基础命令到生产环境安全回退(revert 完整流程)
大数据·elasticsearch·搜索引擎
Elasticsearch11 小时前
Elastic:防范由 AI 驱动的社会工程攻击
elasticsearch
liuyicenysabel13 小时前
从 0 到 1:一套 GitHub + GHCR + k3s 的全自动 CI/CD 流水线(Flask 项目实战)
ci/cd·flask·github
力江16 小时前
GitLab 私有化部署实战 —— 从 Omnibus 到 Docker 的踩坑之旅
docker·容器·gitlab
Elasticsearch16 小时前
避免和纠正热点:Elasticsearch Serverless 如何平衡分片
elasticsearch
Elastic 中国社区官方博客16 小时前
机构如何统一智慧城市数据以改善公共服务?
大数据·人工智能·物联网·elasticsearch·搜索引擎·全文检索·智慧城市
项目管理实用笔记18 小时前
CI/CD是什么?持续集成持续交付入门
运维·ci/cd·研发效能·项目管理·团队开发