Search code examples
homebrewgitlab-ci-runner

how to downgrade gitlab-runner or to run with specific version?


After I upgrade gitlab-runner to version 11.11.0 I can't run local jobs, like gitlab-runner exec docker job_setup. Always, I receive an error:

$ 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

But with gitlab-runner 11.10.0 works well.

I'm trying to downgrade gitlab-runner with brew install gitlab-runner@11.10.0 but it's not working:

$ 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.

How to downgrade gitlab-runner or to run with version 11.11.0?


Solution

  • I found a solution:

    • I uninstalled the last version that I installed with homebrew
    • I installed a manual setup of gitlab-runner at version 11.10.0
    $ 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
    

    Posted on behalf of the question asker