Skip to content
Snippets Groups Projects
Commit 8c6648db authored by David Hrbáč's avatar David Hrbáč
Browse files

Merge branch 'test' into 'master'

new pipeline

See merge request !9
parents 277d6715 30673d50
No related branches found
No related tags found
No related merge requests found
......@@ -46,19 +46,32 @@ deploy to stage:
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
script:
- ls site/
- echo $CI_BUILD_REF_NAME
- ssh root@"$SSH_HOST_STAGE" uptime
- rsync -av --delete site/ root@"$SSH_HOST_STAGE":/tmp/docs/$CI_BUILD_REF_NAME/
#- dpl --provider=s3 --bucket=$S3_BUCKET_NAME
#- ls site/
#- echo $CI_BUILD_REF_NAME
#- ssh root@"$SSH_HOST_STAGE" uptime
- rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/
deploy to production:
environment: production
stage: deploy
image: ruby:latest
before_script:
# install ssh-agent
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- 'which rsync || ( apt-get update -y && apt-get install rsync -y )'
# run ssh-agent
- eval $(ssh-agent -s)
# add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_PRIVATE_KEY")
# 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
script:
- gem install dpl
#- dpl --provider=s3 --bucket=$S3_BUCKET_NAME
#- ls site/
#- echo $CI_BUILD_REF_NAME
#- ssh root@"$SSH_HOST_STAGE" uptime
- rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/
only:
- master
when: manual
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment