Commit dcbb3952 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

add sudo step

parent 6ae4b822
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -5,11 +5,6 @@ os:debian:update:
    - sudo apt-get update
    - sudo apt-mark hold gitlab-runner # We need this process to stay during the upgrade.
    - sudo apt-get full-upgrade -y
    - |
      if ! ping -c 1 1.1.1.1 &> /dev/null; then
        echo "Networking failed during upgrade. Restarting networking."
        sudo systemctl restart networking
      fi
    - sudo apt-get autopurge -y
    - sudo apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}') # Purge package previously only removed
    - sudo apt-get install --only-upgrade -y gitlab-runner & # We'll send this upgrade to the background, so it can finish by itself
+9 −0
Original line number Diff line number Diff line
@@ -10,3 +10,12 @@ Be sure to use the `shell` executor when registering a runner.
Each job checks if `$CI_DISPOSABLE_ENVIRONMENT` is not set. See
[here](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) for
what that means.

## sudo

To ensure the (default) user can access the required commands, without giving it
full access, run `visudo` and add the following line:

```
%gitlab-runner ALL=NOPASSWD: /usr/bin/apt-get, /usr/bin/apt-mark
```