gitlab

图文详解k8s自动化持续集成之GitLab CI/CD

守給你的承諾、 提交于 2019-12-25 18:17:41
前言 持续集成的好处主要有两个: 快速发现错误   每完成一点更新,就集成到主干,可以快速发现错误,定位错误也比较容易 防止分支大幅偏离主干   如果不是经常集成,主干又在不断更新,会导致以后集成的难度变大,甚至难以集成。持续集成的目的,就是让产品可以快速迭代,同时还能保持高质量。它的核心措施是,代码集成到主干之前,必须通过自动化测试。只要有一个测试用例失败,就不能集成。 一、环境准备 首先需要有一台 GitLab 服务器,然后需要有个项目;这里示例项目以 golang 项目为例,然后最好有一台专门用来 Build 的机器,实际生产中如果 Build 任务不频繁可适当用一些业务机器进行 Build;本文示例所有组件将采用 Docker 启动, GitLab HA 等不在本文阐述范围内 Docker Version : 1.13.1 GitLab Version : 10.1.4-ce.0 GitLab Runner Version : 10.1.0 二、GitLab CI 简介 GitLab CI 是 GitLab 默认集成的 CI 功能 ,GitLab CI 通过在项目内 .gitlab-ci.yaml 配置文件读取 CI 任务并进行相应处理;GitLab CI 通过其称为 GitLab Runner 的 Agent 端进行 build 操作;Runner

gitlab-ce on openshift origin 3.7.0-alpha (fedora 26) fails to start

a 夏天 提交于 2019-12-25 11:59:47
问题 After following the below-linked directions on creating a gitlab instance using a self hosted openshift origin 3.7.0-alpha on fedora 26, I'm getting this on the gitlab-ce pod. I've tried deleting and redeploying the pod, and my best google-fu, but still no luck figuring out what the problem is or how to further troubleshoot it. I am able to successfully deploy jenkins using the default provided template. Directions - https://about.gitlab.com/2016/06/28/get-started-with-openshift-origin-3-and

CentOS源码安装GitLab汉化版

为君一笑 提交于 2019-12-25 10:09:08
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> GitLab官网未提供中文语言界面,网络搜了很久,终于找到了集成汉化补丁的源码库。从8.0开始,GitLab使用gitlab-git-http-server处理Web请求,该程序使用Go语言开发。如无法下载Go语言开发包,可以暂时从百度网盘地址: http://pan.baidu.com/s/1hq1mrDM 下载。 示例环境: 软件 版本 CentOS 6.7 x86_64 Git 2.6.2 Ruby 2.2.3 Node.js 4.2.2 Redis 3.0.5 MariaDB 10.0.21 GitLab 8.0.5汉化版 GitLab Shell 2.6.6 Nginx 1.8.0 Go 1.5.1 Gitlab-git-http-server 0.2.14 一、修改Yum源为阿里云提高下载速度 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 二、安装依赖软件包 yum -y install libicu-devel

root权限登录gitlab server 服务器

有些话、适合烂在心里 提交于 2019-12-25 10:05:36
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> root权限登录gitlab server 服务器 [root@web1 ~]# gitlab-rails console production ------------------------------------------------------------------------------------- Gitlab: 10.8.4 (2268d0c) Gitlab Shell: 7.1.2 postgresql: 9.6.8 ------------------------------------------------------------------------------------- Loading production environment (Rails 4.2.10) irb(main):001:0> user = User.where(id: 1).first => #<User id:1 @root> irb(main):002:0> user.password=12345678 => 12345678 irb(main):003:0> user.password_confirmation=12345678 => 12345678 irb(main):004:0> user

Cannot push after BFG Repo-Cleaner

孤街醉人 提交于 2019-12-25 08:17:19
问题 We have a self-hosted Gitlab instance. I used BFG-Repo-Cleaner and everything went well, but when I try to push changes I get this: remote: GitLab: You are not allowed to force push code to a protected branch on this project. P.S. I'm owner of the project. Earlier I made fork of this project and I had no problems pushing changes there. 回答1: I assume you know what you are doing and you really want to force a push. GitLab disallows a forced push to the master branch by default. You can remove

gitlab, post-receive, deploy

浪尽此生 提交于 2019-12-25 08:06:37
问题 Is should be simple but perhaps I don't understand the big picture here. I have setup a GitLab (omnibus) that is working wonderful on Ubuntu 16.04/Apache. On the same machine (the same Apache) I have the www that is supposed to be updated through GitLab. Since I am on the same machine, it's useless to use webhooks or other complicated mechanisms. I just want to copy "on commit to master" to www folder so I choose custom_hooks as explained here http://docs.gitlab.com/ce/administration/custom

How to make server automatically push to Encrypted Git Repository after recieving Unencrypted push

核能气质少年 提交于 2019-12-25 06:49:12
问题 Our company Has a SVN repository for an our software, based off Rails. We've also had a manually updated encrypted repository - pull unencrypted, encode with RubyEncoder, push to encrypted. We've mostly transitioned to Git, and would like to make the process automatic, and I'd like to make the process automatic, and per-commit. So Server recieves a push to unencrypted, any branch Server filters changed .rb files, passing them through Rubyencoder Encrypted .rb files & other files are pushed to

学习Linux的第六十九天

泪湿孤枕 提交于 2019-12-25 05:29:07
安装gitlab docker pull gitlab/gitlab-ce 本机准备gitlab工作目录 mkdir -p /usr/local/gitlab/config mkdir -p /usr/local/gitlab/logs mkdir -p /usr/local/gitlab/data 运行启动gitlab docker run -d --privileged=true --hostname 192.168.86.135 --publish 7001:443 --publish 7002:80 --publish 7003:22 --name gitlab --restart always --volume /usr/local/gitlab/config:/etc/gitlab --volume /usr/local/gitlab/logs:/var/log/gitlab --volume /usr/local/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce 修改gitlab.rb配置文件,上面的方式gitlab容器运行没问题,但在gitlab上创建项目的时候,生成的项目的URL访问地址是按容器的hostname来生成的,也就是容器的id。作为gitlab服务器,我们需要一个固定的URL访问地址,配置/usr/local

Some gitlab projects return 404 error after accidentally mounting two sets of docker-compose containers to the same volumes

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 02:52:01
问题 There's a private gitlab server in my company, which is created by using the docker-compose file of sameersbn/docker-gitlab:10.5.6. Today when I try to move the mounted volumes to a new disk, I accidentally created 2 sets of docker containers( sameersbn/gitlab:10.5.6 , sameersbn/postgresql:9.6-2 , and sameersbn/redis:2.8.4 ) that use the same disk volumes. Then a moment later, someone in the company told me that his project at gitlab returns 404 error. I've checked the PostgreSQL database and

Building docker images with Jib and Gitlab-CI

折月煮酒 提交于 2019-12-25 02:47:07
问题 I am trying to create a pipeline where docker images are created using JIB (via a Maven Plugin) and pushed to my Gitlab Registry. This works fine locally as I am logged into my docker registry. <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> <version>1.0.0</version> <configuration> <allowInsecureRegistries>true</allowInsecureRegistries> <from> <image>dockerhost/projectgroup/alpine</image> </from> <to> <image>dockerhost/project/imagename:${project