From d88c47105d804a9166fb865ea6fedf589d054b3c Mon Sep 17 00:00:00 2001 From: Varac Date: Wed, 19 Jul 2017 18:42:27 +0200 Subject: Set XDG_RUNTIME_DIR properly Otherwise systemctl will complain with: Failed to get D-Bus connection: Connection refused --- .gitlab-ci.yml | 4 ++-- 1 file 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" -- cgit v1.2.3