gitlab

gitlab+jenkins持续集成+自动化部署

梦想与她 提交于 2019-12-07 00:31:48
1、github毕竟试公有的,而私有仓库需要花钱买,可以使用gitlab再公司搭建一个私有仓库呢 首先需要安装 git yum install -y git 添加git 用户,并设置 shell 为 /usr/bin/git-shell ,目的不让git用户远程登录; 创建authorized_keys文件,用来存放客户端的公钥,并更改属主 属组 及权限, mkdir .ssh touch .ssh/authorized_keys chown -R git.git .ssh chmod 600 .ssh/authorized_keys 定义存储git 仓库的目录, mkdir -p /data/gitroot 创建一个裸仓库,裸仓库没有工作区,因为服务器的git 仓库纯粹是为了共享,所以不让用户登录到服务器上改工作区,并且服务器上的git仓库通常是以.git结尾的. [root@localhost_02 ~]# mkdir -p /data/gitroot [root@localhost_02 ~]# git init --bare sample.git ^C [root@localhost_02 ~]# cd /data/gitroot/ [root@localhost_02 gitroot]# git init --bare sample.git 初始化空的 Git 版本库于

gitlab 6.0.2 Jenkins CI services not showing

a 夏天 提交于 2019-12-06 22:52:19
问题 I have a gitlab server version "Gitlab 6.0.2 10b0b8f". I want to connect "Jenkins CI" for build purpose. for this I am following - http://doc.gitlab.com/ee/integration/jenkins.html .But In a project services I am not able to see "Jenkins CI". Only I can See "Gitlab CI". Can you please help me. Any example will be appriciated. 回答1: Solved. Jenkins CI support is only included in the Enterprise version (EE). gitlab server version "Gitlab 6.0.2 10b0b8f" is not a enterprise edition. so it is not

setting gitlab with docker registry error 500

泪湿孤枕 提交于 2019-12-06 22:38:33
I have running docker with docker registry on example.domain.com docker run -d -p 5000:5000 --restart=always --name registry \ -v /etc/ssl/certs/:/certs \ -e REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry \ -v /git/docker_registry:/var/lib/registry \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/server.crt \ -e REGISTRY_HTTP_TLS_KEY=/certs/server.key \ registry:2 I can push and pull to this docker registry but when i try to connect it with gitlab which is running on the same machine example.domain.com using gitlab.yml config: registry: enabled: true host: example.domain.com port: 5005

Integrate Gitlab and TravisCi

南楼画角 提交于 2019-12-06 20:16:18
问题 Is there a way where I can integrate TravisCi with Giltab? or at least logging in TravisCi using username and password and not Github credentials? 回答1: No, as of right now, Travis-CI is strictly bound to GitHub. While there are certainly talks about lessening this requirement, it's still there for still some time to come. As a workaround, you could push your stuff to GitHub and from there to Travis, using GitHub only as an intermediary. 来源: https://stackoverflow.com/questions/22693830

.gitlab-ci.yml after_script section: how can I tell whether the task succeeded or failed?

纵饮孤独 提交于 2019-12-06 19:56:40
问题 I'm using Gitlab CI, and so have been working on a fairly complex .gitlab-ci.yml file. The file has an after_script section which runs when the main task is complete, or the main task has failed somehow. Problem: I need to do different cleanup based on whether the main task succeeded or failed, but I can't find any Gitlab CI variable that indicates the result of the main task. How can I tell, inside the after_script section, whether the main task has succeeded or failed? 回答1: Instead of

how does gitlab ci clone repo into docker?

流过昼夜 提交于 2019-12-06 19:47:38
I'm familar with Bamboo but new to gitlab ci, I have tried several times with gitlab and found a key advantage of gitlab is the automatic cloning of git repository . The tricky part is gitlab ci can even clone repository into docker container automatically . my git repo: .git .gitlab-ci.yml foobar.sh this job: job1: stage: run image: name: my_image script: - ./foobar.sh - some other scripts within the docker can successfully run. The log shows after pulling my_image, there's a git clone action, like what another SO answer said. but the log isn't detail enough to let me know where this command

第一篇博客,讲讲到了一家新公司遇到的一些情况

和自甴很熟 提交于 2019-12-06 17:35:26
来到了一家新公司,发现公司什么都没有。在我来的第二天我旁边的哥们走了,什么交接都没有,只留下他的电脑和开机密码。。。。。 于是首先找来了一台服务器,打算通过vmware套装来进行iass层的虚拟化,找了个U盘,用 UltraISO这个软件做了一个esxi的启动盘 链接:https://pan.baidu.com/s/1XicGS9vvuUjzMgpXqsm8HA 提取码:8m36 这个百度链接里有esxi的iso,大家可以去下载 做好之后,就像给你的台式机装系统一样,很容易就装好了。(记得把exsi的ip改为静态ip啊) 然后不用通过vsphere客户端,6.5是可以通过web直接访问的。 打上ip就可以访问 登陆之后,在存储中添加上需要的iso进行,winserver2016 ubuntu之类的。 接着就可以按照自己的需要创建虚拟机了。 1、gitlab的创建 我想第一个要创建的角色应该就是gitlab,因为代码这个东西,要是电脑本地的代码改坏了,就完蛋了。所以我第一个选择搭建gitlab 我找了一台ubuntuserver18的机器,直接用ap-get install gitlab-ce 安装的,具体的还是百度一下吧,我也是百度的~~下面是我当时随后复制的一段别人的帖子,url已经找不到了 --------------------------------

Migrated project from SVN to Gitlab CE and struggling with workflow and history

五迷三道 提交于 2019-12-06 16:50:02
Previous SVN workflow svn cp $PATH/trunk $REPO/branches/feature_xxx git checkout $REPO/branches/feature_xxx developers worked on working copy of branch, ocasionally merging back with master and before marking the branch as "ready to merge" when the feature was ready, owner did svn merge --reintegrate $REPO/branches/feature_xxx , run complete test suite and if everything ok then ```svn commit -m "merged feature_xxx" when a release was ready svn cp $REPO/trunk $REPO/tags/vX.Y.Z and released that tag. The svn trunk history looked nice and clean: version 4.5.4 feature_xxx bugfix_yyy version 4.5.3

Gitlab repository error failed to find pack entry

家住魔仙堡 提交于 2019-12-06 16:43:57
Gitlab repository corrupted. getting 500 internal server error on frontend. Started GET "/" for 127.0.0.1 at 2016-04-11 16:22:02 +0530 Processing by DashboardController#show as HTML Read fragment views/projects/44-20160408141103000000000/dashboard/show/cc53ca8d7b83612d3f40df2a690c7950 (0.1ms) Completed 500 Internal Server Error in 27ms ActionView::Template::Error (Object not found - failed to find pack entry (509db335d2df02b878c18e1a6fe84393da6978c1)): 2: = link_to project_path(project), class: dom_class(project) do 3: - if avatar 4: .dash-project-avatar 5: = project_icon(project, alt: '',

Docker安装GitLab并挂载数据

我与影子孤独终老i 提交于 2019-12-06 16:35:55
下载镜像 # docker从仓库中拉取最新版的gitlab-ce镜像,如果没加标签的话,默认获取最新的版本latestsudo docker pull gitlab/gitlab-ce 挂载数据卷以及配置文件 # docker从仓库中拉取最新版的gitlab-ce镜像,如果没加标签的话,默认获取最新的版本latest sudo docker run --detach \ --hostname 134.175.36.150 \ --publish 9443:443 --publish 9080:80 --publish 9022:22 \ --name gitlab \ --restart always \ --volume /srv/gitlab/config:/etc/gitlab \ --volume /srv/gitlab/logs:/var/log/gitlab \ --volume /srv/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest 进入Docker容器内 sudo docker exec -it gitlab /bin/bash 来源: https://www.cnblogs.com/weile0769/p/11994626.html