2022-02-10 09:25:26 -08:00
|
|
|
before_script:
|
|
|
|
# update and install git
|
|
|
|
- apt-get update -qq
|
|
|
|
- apt-get install -qq git
|
|
|
|
# configure SSH keys
|
|
|
|
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrickHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
|
|
|
2022-02-09 00:09:45 -08:00
|
|
|
|
2022-02-10 09:34:04 -08:00
|
|
|
server-deploy:
|
|
|
|
when: manual
|
2022-02-09 07:29:00 -08:00
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
- "server/"
|
2022-02-09 00:09:45 -08:00
|
|
|
script:
|
2022-02-10 09:30:27 -08:00
|
|
|
- ssh joey@joey-server "cd /home/joey && git archive --remote=ssh://git@gitlab.jafner.net:2229/Jafner/homelab.git main server/ | tar xvf -"
|
|
|
|
- ssh joey@joey-server "cp -r server/config/* ../docker_config/"
|