github.com/nilium/gitlab-runner@v12.5.0+incompatible/docs/install/osx.md (about)

     1  # Install GitLab Runner on macOS
     2  
     3  GitLab Runner can be installed and updated on macOS.
     4  
     5  ## Installing
     6  
     7  There are two methods for installing GitLab Runner on macOS:
     8  
     9  - [Manual installation](#manual-installation-official). This method is officially supported and recommended by GitLab.
    10  - [Homebrew installation](#homebrew-installation-alternative). Install with [Homebrew](https://brew.sh) as an alternative to manual installation.
    11  
    12  ### Manual installation (official)
    13  
    14  NOTE: **Note:**
    15  For documentation on GitLab Runner 9 and earlier, [visit this documentation](old.md).
    16  
    17  1. Download the binary for your system:
    18  
    19     ```bash
    20     sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64
    21     ```
    22  
    23     You can download a binary for every available version as described in
    24     [Bleeding Edge - download any other tagged release](bleeding-edge.md#download-any-other-tagged-release).
    25  
    26  1. Give it permissions to execute:
    27  
    28     ```bash
    29     sudo chmod +x /usr/local/bin/gitlab-runner
    30     ```
    31  
    32  **The rest of commands execute as the user who will run the Runner.**
    33  
    34  1. [Register the Runner](../register/index.md)
    35  1. Install the Runner as service and start it:
    36  
    37     ```bash
    38     cd ~
    39     gitlab-runner install
    40     gitlab-runner start
    41     ```
    42  
    43  Runner is installed and will be run after a system reboot.
    44  
    45  ### Homebrew installation (alternative)
    46  
    47  A Homebrew [formula is available](https://formulae.brew.sh/formula/gitlab-runner) to install GitLab.
    48  
    49  CAUTION: **Caution:**
    50  GitLab does not maintain the Homebrew formula.
    51  
    52  To install GitLab Runner using Homebrew:
    53  
    54  1. Install the GitLab Runner.
    55  
    56     ```bash
    57     brew install gitlab-runner
    58     ```
    59  
    60  1. Install the Runner as a service and start it.
    61  
    62     ```bash
    63     brew services start gitlab-runner
    64     ```
    65  
    66  Runner is installed and running.
    67  
    68  ### Limitations on macOS
    69  
    70  >**Note:**
    71  The service needs to be installed from the Terminal by running its GUI
    72  interface as your current user. Only then will you be able to manage the service.
    73  
    74  Currently, the only proven to work mode for macOS is running service in user-mode.
    75  
    76  Since the service will be running only when the user is logged in, you should
    77  enable auto-login on your macOS machine.
    78  
    79  The service will be launched as one of `LaunchAgents`. By using `LaunchAgents`,
    80  the builds will be able to do UI interactions, making it possible to run and
    81  test on the iOS simulator.
    82  
    83  It's worth noting that macOS also has `LaunchDaemons`, the services running
    84  completely in background. `LaunchDaemons` are run on system startup, but they
    85  don't have the same access to UI interactions as `LaunchAgents`. You can try to
    86  run the Runner's service as `LaunchDaemon`, but this mode of operation is not
    87  currently supported.
    88  
    89  You can verify that the Runner created the service configuration file after
    90  executing the `install` command, by checking the
    91  `~/Library/LaunchAgents/gitlab-runner.plist` file.
    92  
    93  ## Manual update
    94  
    95  1. Stop the service:
    96  
    97     ```bash
    98     gitlab-runner stop
    99     ```
   100  
   101  1. Download the binary to replace the Runner's executable:
   102  
   103     ```bash
   104     sudo curl -o /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64
   105     ```
   106  
   107     You can download a binary for every available version as described in
   108     [Bleeding Edge - download any other tagged release](bleeding-edge.md#download-any-other-tagged-release).
   109  
   110  1. Give it permissions to execute:
   111  
   112     ```bash
   113     sudo chmod +x /usr/local/bin/gitlab-runner
   114     ```
   115  
   116  1. Start the service:
   117  
   118     ```bash
   119     gitlab-runner start
   120     ```
   121  
   122  Make sure that you read the [FAQ](../faq/README.md) section which describes
   123  some of the most common problems with GitLab Runner.
   124  
   125  ## Upgrade the service file
   126  
   127  In order to upgrade the `LaunchAgent` configuration, you need to uninstall and
   128  install the service:
   129  
   130  ```bash
   131  gitlab-runner uninstall
   132  gitlab-runner install
   133  gitlab-runner start
   134  ```