gitlabci安装

编程

step1: ubuntu git" title="安装git">安装gitlab ci

  • 获取系统架构信息

参考地址

root@starbuck:~# uname -ar

Linux starbuck 4.4.0-146-generic #172-Ubuntu SMP Wed Apr 3 09:00:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

root@starbuck:~#

root@starbuck:~# dpkg --print-architecture

amd64

root@starbuck:~#

step2: 下载安装

参考

root@starbuck:~# dpkg -i gitlab-runner_amd64.deb

Selecting previously unselected package gitlab-runner.

(Reading database ... 115843 files and directories currently installed.)

Preparing to unpack gitlab-runner_amd64.deb ...

Unpacking gitlab-runner (13.1.1) ...

Setting up gitlab-runner (13.1.1) ...

GitLab Runner: creating gitlab-runner...

Runtime platform arch=amd64 os=linux pid=3942 revision=6fbc7474 version=13.1.1

gitlab-runner: Service is not installed.

Runtime platform arch=amd64 os=linux pid=3952 revision=6fbc7474 version=13.1.1

gitlab-ci-multi-runner: Service is not installed.

Runtime platform arch=amd64 os=linux pid=3980 revision=6fbc7474 version=13.1.1

Runtime platform arch=amd64 os=linux pid=4027 revision=6fbc7474 version=13.1.1

Clearing docker cache...

root@starbuck:~#

root@starbuck:~# which gitlab-runner

/usr/bin/gitlab-runner

root@starbuck:~# ll /home/gitlab-runner/

total 20

drwxr-xr-x 2 gitlab-runner gitlab-runner 4096 Jul 14 14:42 ./

drwxr-xr-x 3 root root 4096 Jul 14 14:42 ../

-rw-r--r-- 1 gitlab-runner gitlab-runner 220 Sep 1 2015 .bash_logout

-rw-r--r-- 1 gitlab-runner gitlab-runner 3771 Sep 1 2015 .bashrc

-rw-r--r-- 1 gitlab-runner gitlab-runner 655 May 16 2017 .profile

root@starbuck:~# ps -ef | grep gitl

root 4036 1 0 14:42 ? 00:00:00 /usr/lib/gitlab-runner/gitlab-runner run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user gitlab-runner

root 4131 3820 0 14:44 pts/2 00:00:00 grep --color=auto gitl

root@starbuck:~#

step3: 加入到gitlab runner

root@starbuck:~# cat /etc/gitlab-runner/config.toml

concurrent = 1

check_interval = 0

[session_server]

session_timeout = 1800

[[runners]]

name = "shijingli_ci"

url = "http://ip/ci"

token = "xxxx"

executor = "shell"

[runners.cache]

root@starbuck:~#

以上是 gitlabci安装 的全部内容, 来源链接: utcz.com/z/518308.html

回到顶部