Merge branch 'master' of git.ahoskingit.com:family/period
This commit is contained in:
commit
f2e48f61b8
@ -1,6 +1,7 @@
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
buiild job:
|
buiild job:
|
||||||
stage: build
|
stage: build
|
||||||
@ -32,3 +33,21 @@ test job:
|
|||||||
when: always
|
when: always
|
||||||
reports:
|
reports:
|
||||||
junit: report.xml
|
junit: report.xml
|
||||||
|
|
||||||
|
deploy-period:
|
||||||
|
stage: deploy
|
||||||
|
environment: production
|
||||||
|
image: debian:buster
|
||||||
|
before_script:
|
||||||
|
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
- ssh-keyscan 192.168.1.19 >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
script:
|
||||||
|
- ssh ahosking@192.168.1.19 "cd /home/ahosking/period && git pull origin master && exit"
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user