【docker-gitlab】教程文章相关的互联网学习教程文章

docker-gitlab【代码】

之前搭建的gitlab因为使用编译安装参数问题,不能使用ssh认证,重新修改比较麻烦,之后查询资料使用sameersbn的docker环境搭建可解决,简单易用,记录如下;github地址:https://github.com/sameersbn/docker-gitlab主要需要修改的文件为docker-compose.yml,里面定义了使用的镜像和相关参数,主要说明如下:主要使用redis、postgresql和gitlab镜像(也可使用mysql,但官方建议使用postgresql)version: ‘2‘ services: redis: ...

3)gitlab+jenkins自动化发布;发布tomcat项目【图】

发布项目首先要有tomct服务器:将jenkins服务器和tomcat做免密钥登陆:ssh-copy-id root@172.16.0.237 ssh 172.16.0.237即可:同样在gitlab上面也要吧jenkins的公钥放上去,同样将gitlab域名和ip写道jenkins的hosts当中接下来创建项目:写个小脚本在jenkins服务器上面:内容如下:yes | scp /opt/apache-tomcat-7.0.61/webapps/jenkins/workspace/mdj/server.xml root@172.16.0.237:/rootssh 172.16.0.237 'bash -x -s' </jiaob...

Centos7安装gitlab【代码】【图】

GitLab是一个利用Ruby on Rails开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目.安装参考https://about.gitlab.com安装相关的依赖和软件包yum -y install policycoreutils openssh-server openssh-clients postfix curl policycoreutils-python openssh-serversystemctl enable postfix && systemctl start postfix systemctl enable sshd systemctl start sshd添加GitLab仓库,并安装到...

Jenkins+Git+Gitlab+Ansible实现持续集成自动化部署静态网站

Jenkins+Git+Gitlab+Ansible实现持续集成自动化 部署静态网站 Gitlab创建项目 第一步:gitlab的安装即配置请参考我之前的博客《Gitlab在linux/windows中免密使用(二)–技术流ken》 第二步:创建项目如下图,我创建了一个static_web的项目Git下载仓库 第一步:创建目录并下载仓库[root@ken ~]# mkdir /ken[root@ken ~]# cd /ken[root@ken ken]# git clone http://10.220.5.137/we...

gitlab 统计

git log --pretty=‘%aN‘ | sort | uniq -c | sort -k1 -n -r %an 作者(author)的名字 第一个sort是一般排序uniq 去掉重复的行数uniq -c 统计一共重复了几行,并显示sort -k1 -n -rk1 对第一排进行排序-n 对第一排进行排序进行小到大的排序-r 翻转排序原文:http://3367071.blog.51cto.com/3357071/1859468

gitlab-runner报错解决:ERROR: Could not create cache adapter error=cache factory not found: factory for cache adapter "" was not registered【代码】

背景说明: 项目采用的是代码提交后会自动触发gitlab-runner功能,然后编译项目,制作成docker镜像,上传到nexus仓库。使用一段时间后出现个问题,在项目编译后生成的jar包这儿报错,具体信息如下: 这个报错信息是gitlab-runner工具的报错信息ERROR: Could not create cache adapter error=cache factory not found: factory for cache adapter "" was not registere gitlab编译页面也会显示有关的错误信息,这里忘了截图保存...

gitlab的安装和配置

1 使用omnibus gitlab来安装gitlab也就是说,将gitlab和它所需要的组件打一个包,即打一个bundle进行安装。第一步,安装gitlab的源。curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash将源改成镜像的源。apt-get update第二步,安装sudo apt-get install gitlab-ce2 omnibus gitlab-ce bundle的组件包括:nginx、redis和postgres3 gitlab的各个配置选项4 nginx的用途以及各个配置...

gitlab备份还原【代码】

gitlab目录存放/var/opt/gitlab/git-data/repositories/ 库默认存储目录 /opt/gitlab/ 应用代码和相应的依赖程序 /etc/gitlab/ 配置文件目录 /var/log/gitlab/ 此目录下存放了gitlab各个组件产生的日志 /var/opt/gitlab/backups/ 备份文件生成的目录 变更配置文件,需要以下操作gitlab-ctl reconfigure 重置配置文件 gitlab-ctl show-config 验证配置文件 一、备份配置文件中加入gitlab_rails[‘backup_path‘] = "/var/opt/gitlab...

创建gitlab ssh 密钥【代码】【图】

SSH代表用于管理网络,操作系统和配置的Secure Shell或Secure Socket Shell,并且每次都不需要使用用户名和密码即可验证GitLab服务器。 您可以设置SSH密钥以提供计算机与GitLab之间的可靠连接。 在生成ssh keygen之前,您需要在系统中安装Git。创建SSH密钥步骤(1): 要创建SSH密钥,请打开Git Bash命令提示符并输入命令,如下所示:ssh-keygen Shell它会提示’输入保存密钥的文件(//.ssh/id_rsa):’,只需键入文件名并按回车。 接下来...

Jenkins+Ansible+Gitlab自动化部署三剑客(六)--Jenkins GIT集成【图】

Jenkins Git集成1.新建项目 2.新建gitlab项目 克隆地址 3.添加git选项 4.build并查看日志 原文:https://www.cnblogs.com/bk770466199/p/12341025.html

一键安装 gitlab7 on rhel6.4 并设置邮件发送

一键安装 gitlab7 on rhel6.4 并设置邮件发送世间本无事,庸人自扰之。书归正传,简短节说:gitlab是个好东西,可是安装手冊奇烂。尽管以前对比文档一步一步安装起来gitlab 6.x,可是,时过境迁,再也不想把时间花在这无聊的配置上。谷歌已然变成往日黄花,又无翻越墙狱之利器,仅仅能在百度和Bing之间来回寻找答案。功夫不负苦心人。最终找到这个bitnami的一键安装包。bitnami-gitlab-7.1.1-0-linux-x64-installer.run。https://b...

jenkins结合gitlab实现提交代码自动构建【图】

jenkins可以说是现在非常流行的一个继续集成工具,几乎所有的公司都在用,并且它也基本是devops的连接者,是一个比较核心的工具。主要记录以下两个:利用jenkins和gitlab的webhook结合,实现提交代码之后,自动触发jenkins的构建。顺带介绍一下通过触发器构建,比如直接通过url去触发的方式。一、jenkins结合webhook1、jenkins配置 a、首先jenkins得需要安装两个gitlab的插件:Gitlab Hook Plugin和gitlab,插件的安装可以直接在线...

CentOs7搭建gitLab【代码】

1. 安装并配置依赖,打开防火墙HTTP,SSH链接yum install -y curl policycoreutils-python openssh-server systemctl enable sshd systemctl start sshd firewall-cmd --permanent --add-service=http systemctl reload firewalld注:对于防火墙直接关闭内网防火墙即可,服务器内存至少4G2. 安装Postfix发信服务器yum install postfix systemctl enable postfix systemctl start postfix 错误: Job for postfix.service failed be...

gitlab push时报错【代码】【图】

1、报错信息: Counting objects: 3, done. Writing objects: 100% (3/3), 205 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) remote: /opt/gitlab-6.9.0-0/ruby/lib/ruby/1.9.1/net/http.rb:763:in `initialize‘: getaddrinfo: No address associated with hostname (SocketError) remote: from /opt/gitlab-6.9.0-0/ruby/lib/ruby/1.9.1/net/http.rb:763:in `open‘ remote: from /opt/gitlab-6.9....

用docker部署gitlab【代码】【图】

docker hub官网下载gitlab速度太慢,改用国内镜像+中文版docker pull registry.cn-hangzhou.aliyuncs.com/lab99/gitlab-ce-zh建立1个docker-compose.ymlimage用刚才pull的那个地址hostname 和 external_url 都改成127.0.0.1了,毕竟只是试验嘛。version: ‘2‘ services:web:image: ‘registry.cn-hangzhou.aliyuncs.com/lab99/gitlab-ce-zh:latest‘restart: alwayshostname: ‘127.0.0.1‘environment:GITLAB_OMNIBUS_CONFIG: |e...