.drone.yml 906 B

12345678910111213141516171819202122232425262728
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. steps:
  6. - name: yamlint the config
  7. pull: if-not-exists
  8. image: sdesbure/yamllint
  9. commands:
  10. - yamllint -c .yamllint.yaml .
  11. - name: verify config, update image and upgrade images
  12. pull: if-not-exists
  13. image: docker:rc-cli
  14. environment:
  15. DEPLOY_HOST: pve0.progresnet.com.pl
  16. DEPLOY_USER: deploy
  17. DEPLOY_ADMIN_PRIV_KEY:
  18. from_secret: SECRET_SSH_DRONE_PRIVKEY
  19. commands:
  20. - apk update && apk add -qU openssh-client
  21. - mkdir ~/.ssh
  22. - ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts
  23. - echo $DEPLOY_ADMIN_PRIV_KEY | base64 -d > ~/.ssh/id_rsa
  24. - chmod -R 600 ~/.ssh
  25. - ssh -t $DEPLOY_USER@$DEPLOY_HOST "sudo git -C /opt/docker/zwiedzanietorunia pull && sudo docker compose -f /opt/docker/zwiedzanietorunia/docker-compose.yml --env-file=/opt/docker/zwiedzanietorunia/.env up -d"