2022-02-10 09:38:14 -08:00
|
|
|
stages:
|
2022-02-25 18:47:08 -08:00
|
|
|
- test
|
2022-02-10 09:38:14 -08:00
|
|
|
- deploy
|
|
|
|
|
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
|
2022-02-10 09:45:07 -08:00
|
|
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
2022-02-25 18:47:08 -08:00
|
|
|
|
2022-02-10 09:25:26 -08:00
|
|
|
|
2022-02-25 13:30:41 -08:00
|
|
|
server-deploy:
|
2022-02-25 10:27:03 -08:00
|
|
|
stage: deploy
|
|
|
|
when: always
|
2022-02-25 13:30:41 -08:00
|
|
|
rules:
|
|
|
|
- changes:
|
|
|
|
- server/
|
|
|
|
when: manual
|
2022-02-25 10:27:03 -08:00
|
|
|
script:
|
2022-02-25 13:30:41 -08:00
|
|
|
- ssh joey@joey-server "cd /home/joey/homelab && git pull"
|
2022-02-25 18:47:08 -08:00
|
|
|
|
|
|
|
seedbox-deploy:
|
|
|
|
stage: deploy
|
|
|
|
when: always
|
|
|
|
rules:
|
|
|
|
- changes:
|
|
|
|
- seedbox/
|
|
|
|
when: manual
|
|
|
|
script:
|
|
|
|
- ssh joey@joey-seedbox "cd /home/joey/homelab && git pull"
|
|
|
|
|
|
|
|
jafner-tools-deploy:
|
|
|
|
stage: deploy
|
|
|
|
when: always
|
|
|
|
rules:
|
|
|
|
- changes:
|
|
|
|
- jafner-tools/
|
|
|
|
when: manual
|
|
|
|
script:
|
|
|
|
- ssh root@jafner.tools "cd /root/homelab && git pull"
|