diff options
author | Varac <varac@leap.se> | 2017-07-19 18:42:27 +0200 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-07-19 18:42:27 +0200 |
commit | 7f66a5aa272d9f9237b0dcb04d84321d8b26a1d0 (patch) | |
tree | cbe9cc6e1631be4262a6cecacd3160bd7964543a /.gitlab-ci.yml | |
parent | 4460c1cba9dc61a2ada3b8be8da5deb3e3cf268a (diff) |
Set XDG_RUNTIME_DIR properly
Otherwise systemctl will complain with:
Failed to get D-Bus connection: Connection refused
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37a6059..9fae8a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,8 +19,6 @@ deploy: stage: deploy environment: name: production - script: - - ssh dashboard@hare.leap.se "cd ~/dashboard ; git pull; systemctl --user restart dashboard.service" before_script: # https://docs.gitlab.com/ce/ci/ssh_keys/README.html # Install ssh-agent if not already installed, it is required by Docker. @@ -39,3 +37,5 @@ deploy: # you will overwrite your user's SSH config. - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + script: + - ssh dashboard@hare.leap.se "export XDG_RUNTIME_DIR=/run/user/$UID; cd ~/dashboard ; git pull; systemctl --user restart dashboard.service" |