21

gitlab-runner升级到最新版本 - 简书

 4 years ago
source link: https://www.jianshu.com/p/4adb7c01cbb0?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

gitlab-runner升级到最新版本

0.1782020.02.01 17:28:12字数 198阅读 1,325

之前的文章介绍了GitLab Runner安装,在Ubuntu上默认直接安装了gitlab-runner,命令为:

sudo  apt install gitlab-runner

但其实安装的版本为10.5.0,使用命令gitlab-runner -v可以查看,在运行docker executor出现错误:

 Gitlab CI Build failed gitlab-runner-prebuilt.tar.xz: no such file or directory

出现这个问题的原因是因为gitlab-runner的版本过低,当前gitlab-runner最新版本为:12.7.1
解决办法:升级gitlab-runner为最新版本,先升级包:

# For Debian/Ubuntu/Mint
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash

# For RHEL/CentOS/Fedora
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash

需要先安装curl。
再安装最近版本的gitlab-runner:

apt update
apt upgrade  
# or
apt install gitlab-runner

查看当前gitlab-runner版本:

gitlab-runner -v
Version:      12.7.1
Git revision: 003fe500
Git branch:   12-7-stable
GO version:   go1.13.5
Built:        2020-01-23T09:08:54+0000
OS/Arch:      linux/amd64

本文由 Matrixport 姜家志 编写,转载无需授权
Matrixport是一站式数字资产金融平台,致力于打造下一代区块链金融平台,为加密经济而生


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK