homelab/.gitlab-ci.yml

32 lines
859 B
YAML
Raw Normal View History

2022-02-10 09:38:14 -08:00
stages:
- 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-10 09:25:26 -08:00
2022-02-25 10:27:03 -08:00
do-nothing:
stage: deploy
when: always
script:
2022-02-25 10:27:59 -08:00
- echo "Nothing'd successfully!"
2022-02-09 00:09:45 -08:00
2022-02-25 10:25:37 -08:00
#server-deploy:
# stage: deploy
# when: always
# rules:
# - changes:
# - server/
# when: manual
# script:
# - 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/"
# - ssh joey@joey-server "rm -rf server/"