Add new file
This commit is contained in:
parent
46d29dc9d3
commit
71c78d82b2
27
.gitlab-ci.yml
Normal file
27
.gitlab-ci.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
image: debian:stable
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
deploy_prod:
|
||||||
|
stage: deploy
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
except:
|
||||||
|
- tags
|
||||||
|
before_script:
|
||||||
|
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
|
||||||
|
- apt-get update -y && apt-get install sshpass -y
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
- git checkout -b ci_processing
|
||||||
|
- git config --global user.name "Push Runner"
|
||||||
|
- git config --global user.email "runner@lab.knrg.su"
|
||||||
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/key
|
||||||
|
- printf "host $PROD_HOST\n Port $PROD_PORT\n IdentityFile ~/.ssh/key" > ~/.ssh/config
|
||||||
|
#- chmod 600 "$SSH_PRIVATE_KEY"
|
||||||
|
- ssh-keyscan $PROD_HOST >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
script:
|
||||||
|
- git remote add dokku ssh://dokku@dokku2.redguy.ru/exchange-bot
|
Reference in New Issue
Block a user