diff options
author | Varac <varac@leap.se> | 2017-07-19 18:42:27 +0200 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-10-16 13:20:45 +0200 |
commit | d88c47105d804a9166fb865ea6fedf589d054b3c (patch) | |
tree | f2208828e14c8892e7a37c6127f02376c4c49fb2 | |
parent | a903156109a4b93ddb3bcd6fb1401f92f88056eb (diff) |
Set XDG_RUNTIME_DIR properly
Otherwise systemctl will complain with:
Failed to get D-Bus connection: Connection refused
-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" |