gitlab-runner升級到最新版本

以前的文章介紹了GitLab Runner安裝,在Ubuntu上默認直接安裝了gitlab-runner,命令爲:linux

sudo  apt install gitlab-runner

但其實安裝的版本爲10.5.0,使用命令gitlab-runner -v能夠查看,在運行docker executor出現錯誤:git

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

出現這個問題的緣由是由於gitlab-runner的版本太低,當前gitlab-runner最新版本爲:12.7.1
解決辦法:升級gitlab-runner爲最新版本,先升級包:docker

# 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:bash

apt update
apt upgrade  
# or
apt install gitlab-runner

查看當前gitlab-runner版本:curl

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是一站式數字資產金融服務平臺,致力於打造下一代數字金融平臺,爲加密經濟而生gitlab

相關文章
相關標籤/搜索