From ccddfc62ea4f9f8ecd8924283cc4b7f263a6ce46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrb=C3=A1=C4=8D?= <david@hrbac.cz> Date: Wed, 2 Nov 2016 12:02:47 +0100 Subject: [PATCH] nginx owner --- .gitlab-ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aba62285a..f13a5f15f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,12 +44,15 @@ deploy to stage: # disable host key checking (NOTE: makes you susceptible to man-in-the-middle attacks) # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config - mkdir -p ~/.ssh - - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - adduser nginx script: #- ls site/ #- echo $CI_BUILD_REF_NAME #- ssh root@"$SSH_HOST_STAGE" uptime - - rsync -av --delete --chown=nginx:nginx site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ + - chown nginx site -R + - ls + - rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ deploy to production: environment: production @@ -71,7 +74,7 @@ deploy to production: #- ls site/ #- echo $CI_BUILD_REF_NAME #- ssh root@"$SSH_HOST_STAGE" uptime - - rsync -av --delete --chown=nginx:nginx site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/ + - rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/ only: - master when: manual -- GitLab