gitlab

git和jenkins自动化代码上线

[亡魂溺海] 提交于 2020-01-03 21:21:45
1. 介绍 什么是持续集成? 经常频繁的代码合并, 持续集成跟运维有关的工作,提供一个代码仓库,版本控制系统(备份,迁移) 什么是持续交付? 开发团队---测试团队---运维上线 开发团对,单元测试,---测试-- 代码质量检测--- 测试, sonarqube 什么是持续部署? 频繁的代码上线,持续部署 2. 持续集成 什么是版本控制系统 每一次提交或修改都看作是一个版本 版本控制系统解决了什么问题? 快速回滚到指定的版本,只保留变化的内容 常见版本控制系统svn与git区别? svn: 中心化的代码仓库 git: 分布式的代码仓库 安装和配置git #git的安装 yum install git -y git --version ​ git config --global user.name "xxxx" git config --global user.email "xxxx@qq.com" git config --global color.ui "true" 创建版本库 mkdir test cd test git init git仓库添加文件 git add . #添加文件到缓冲区 git commit -m 'add three file' git修改文件名称并提交 git mv file1 file4 git commit -m 'change file name'

GitLab API to get all commits of a specific branch

江枫思渺然 提交于 2020-01-03 15:36:47
问题 By default, the API GET /projects/:id/repository/commits gets commits of master branch, but I want to get other branch's commits. 回答1: According to Gitlab docs you can add parameter "ref_name" and specify the branch from which you want to get the commits: GET /projects/:id/repository/commits?ref_name=my_branch_name 回答2: I will complement the answer by K. Gol: Need to add params: per_page and page . The value more than 100 has been ignored for the param per_page . 来源: https://stackoverflow.com

Gitlab CI/CD job's log exceeded limit

末鹿安然 提交于 2020-01-03 14:00:05
问题 When I run my job on Gitlab CI/CD, after a while I obtain the following error message: Job's log exceeded limit of 4194304 bytes. How to change this limit? 回答1: To change the build log size of your jobs in Gitlab CI/CD, you can edit your config.toml file and add a new limit in kilobytes: [[runners]] output_limit = 10000 According to the documentation output_limit : Set maximum build log size in kilobytes, by default set to 4096 (4MB) 来源: https://stackoverflow.com/questions/53541000/gitlab-ci

Git - fatal: Could not get current working directory?

一世执手 提交于 2020-01-03 13:15:35
问题 When I git clone from a repo, I get, fatal: Could not get current working directory: No such file or directory What do I do? I have checked the server and found that .git file exists. The server is running a Gitlab instance. I have configured ssh properly with the keys, and I've been committing & cloning for a while now without any error, and this happens all of a sudden. FWIW, I'm doing the git clone in a bash script. Update This is my bash script, for repo in $repos do git clone $repo /tmp

Gitlab CI - Auto DevOps job failed, Unable to select a buildpack for a Go project?

我们两清 提交于 2020-01-03 13:09:21
问题 My Gitlab CI Auto DevOps job failed with Status: Downloaded newer image for gliderlabs/herokuish:latest -----> Unable to select a buildpack ERROR: Job failed: exit code 1 I've gone through Auto DevOps and Getting started with Auto DevOps and am still not sure where I should put the buildpack. Mine should be heroku-buildpack-go , which I've lost track where I get that from. My repo consist only a single-character README.md , and the "Hello, playground" main.go . Conclusion: Thanks to David's

How to solve Access denied in gitlab?

旧街凉风 提交于 2020-01-03 08:47:06
问题 When I run : git push , there is exist error like this : remote: Access denied fatal: unable to access 'https://gitlab.com/myname/mysystem.git/': The requested URL returned error: 403 Is there any people who can help me? 回答1: You need to add an SSH key to your GitLab and make sure git is using that key. You can find this documentation helpful. 回答2: For Windows users, check this unbelievable easy solution, which works for me: Go to Windows Credential Manager (press Windows Key and type

Create a wiki page in gitlab

微笑、不失礼 提交于 2020-01-03 08:22:11
问题 I'm trying to create a simple wiki page on gitlab. Anyone knows of any good tutorials that could assist me in achieving that? I tried searching google for any tutorials but could not find any that are relevant. 回答1: You can use http://pad.haroopress.com/ as an editor, to see how it will look like in a wiki gitlab page. In the bottom-left corner is a button, when you hit that button, you will get the markdown help. 回答2: I think you are looking for page not the wikipage (if you are looking for

Create a wiki page in gitlab

可紊 提交于 2020-01-03 08:22:02
问题 I'm trying to create a simple wiki page on gitlab. Anyone knows of any good tutorials that could assist me in achieving that? I tried searching google for any tutorials but could not find any that are relevant. 回答1: You can use http://pad.haroopress.com/ as an editor, to see how it will look like in a wiki gitlab page. In the bottom-left corner is a button, when you hit that button, you will get the markdown help. 回答2: I think you are looking for page not the wikipage (if you are looking for

Assign Bitbucket Server to Gitlab

我的梦境 提交于 2020-01-03 05:27:11
问题 I have Gitlab account free trial i want to connect gitlab with bitbucket To migrate from Bitbucket To Gitlab . When i Choose > New project > Import project > Bitbucket > bitbucket.org index will appear to enter Email and Password , But i have Bitbucket installed my Server i want to assign my Bbitbucket server URL to Gitlab to Login from gitlab and began to migrate . I can not log in to Bitbucket.org i want to log in with my bitbucket in my server username and password . How can assign my

OSX 10.11.3 Install gitlab server using docker

限于喜欢 提交于 2020-01-03 03:34:14
问题 My English not good, sorry! I install gitlab server using docker. First I install Docker Toolbox,and then I follow the steps below: Step 1. Launch a postgresql container docker run --name gitlab-postgresql -d \ --env 'DB_NAME=gitlabhq_production' \ --env 'DB_USER=gitlab' --env 'DB_PASS=password' \ --volume /srv/docker/gitlab/postgresql:/var/lib/postgresql \ sameersbn/postgresql:9.4-12 Step 2. Launch a redis container docker run --name gitlab-redis -d \ --volume /srv/docker/gitlab/redis:/var