如何降级 gitlab-runner 或使用特定版本运行?

Rui*_*ins 6 homebrew gitlab-ci-runner

将 gitlab-runner 升级到版本 11.11.0 后,我无法运行本地作业,例如gitlab-runner exec docker job_setup. 总是,我收到一个错误:

$ gitlab-runner exec docker job_setup

Runtime platform                                    arch=amd64 os=darwin pid=1688 revision=6c154264 version=11.11.0
Running with gitlab-runner 11.11.0 (6c154264)
Using Docker executor with image ubuntu:16.04 ...
Pulling docker image ubuntu:16.04 ...
Using docker image sha256:2a697363a8709093834e852b26bedb1d85b316c613120720fea9524f0e98e4a2 for ubuntu:16.04 ...
Running on runner--project-0-concurrent-0 via HappyMeal2.local...
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
Cloning repository...
fatal: repository '/Users/rui/(...)/helm-deploy-service-example' does not exist
ERROR: Job failed: exit code 1
FATAL: exit code 1
Run Code Online (Sandbox Code Playgroud)

但是使用 gitlab-runner 11.10.0 运行良好。

我正在尝试降级 gitlab-runner brew install gitlab-runner@11.10.0但它不起作用:

$ brew install gitlab-runner@11.10.0
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

Error: No available formula with the name "gitlab-runner@11.10.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我降级 gitlab-runner使用 11.11.0 版运行

谢谢


编辑: 我找到了一个解决方案:

  • 我卸载了我用自制软件安装的最后一个版本
  • 我在 11.10.0 版本安装了 gitlab-runner 的手动设置
$ brew uninstall gitlab-runner
$ rm -rf /Users/$(whoami)/Library/LaunchAgents/gitlab-runner.plist

$ sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/v11.10.0/binaries/gitlab-runner-darwin-amd64
$ sudo chmod +x /usr/local/bin/gitlab-runner
$ cd ~
$ gitlab-runner install
$ gitlab-runner start
Run Code Online (Sandbox Code Playgroud)

Dha*_*man 2

我找到了一个解决方案:

  • 我卸载了用自制程序安装的最后一个版本
  • 我在版本 11.10.0 上安装了 gitlab-runner 的手动设置
$ brew uninstall gitlab-runner
$ rm -rf /Users/$(whoami)/Library/LaunchAgents/gitlab-runner.plist

$ sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/v11.10.0/binaries/gitlab-runner-darwin-amd64
$ sudo chmod +x /usr/local/bin/gitlab-runner
$ cd ~
$ gitlab-runner install
$ gitlab-runner start
Run Code Online (Sandbox Code Playgroud)

代表提问者发表