test deploy to sec server

This commit is contained in:
lukas 2021-11-07 18:05:46 +01:00
parent be2b848f8e
commit e513877019

View File

@ -115,8 +115,11 @@ Test_Server:
- Frontend_Tests
- Backend_Tests
- Debian_Server
only:
- master
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH # run this always on default branch
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH # allow triggering this manually
when: manual
allow_failure: true
script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
@ -126,3 +129,24 @@ Test_Server:
- ssh root@192.168.0.42 "DEBIAN_FRONTEND=noninteractive apt-get --reinstall -y -qq install /tmp/OpenMediaCenter-*.deb && rm /tmp/OpenMediaCenter-*.deb"
allow_failure: true
Test_Server_2:
stage: deploy
image: luki42/ssh:latest
needs:
- Frontend_Tests
- Backend_Tests
- Debian_Server
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH # run this always on default branch
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH # allow triggering this manually
when: manual
allow_failure: true
script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_2" | ssh-add -
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- scp deb/OpenMediaCenter-*.deb root@192.168.0.209:/tmp/
- ssh root@192.168.0.209 "DEBIAN_FRONTEND=noninteractive apt-get --reinstall -y -qq install /tmp/OpenMediaCenter-*.deb && rm /tmp/OpenMediaCenter-*.deb"
allow_failure: true