|
@@ -0,0 +1,28 @@
|
|
|
|
|
+---
|
|
|
|
|
+kind: pipeline
|
|
|
|
|
+type: docker
|
|
|
|
|
+name: default
|
|
|
|
|
+
|
|
|
|
|
+steps:
|
|
|
|
|
+
|
|
|
|
|
+ - name: yamlint the config
|
|
|
|
|
+ pull: if-not-exists
|
|
|
|
|
+ image: sdesbure/yamllint
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - yamllint -c .yamllint.yaml .
|
|
|
|
|
+
|
|
|
|
|
+ - name: verify config, update image and upgrade images
|
|
|
|
|
+ pull: if-not-exists
|
|
|
|
|
+ image: docker:rc-cli
|
|
|
|
|
+ environment:
|
|
|
|
|
+ DEPLOY_HOST: pve0.progresnet.com.pl
|
|
|
|
|
+ DEPLOY_USER: deploy
|
|
|
|
|
+ DEPLOY_ADMIN_PRIV_KEY:
|
|
|
|
|
+ from_secret: SECRET_SSH_DRONE_PRIVKEY
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - apk update && apk add -qU openssh-client
|
|
|
|
|
+ - mkdir ~/.ssh
|
|
|
|
|
+ - ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts
|
|
|
|
|
+ - echo $DEPLOY_ADMIN_PRIV_KEY | base64 -d > ~/.ssh/id_rsa
|
|
|
|
|
+ - chmod -R 600 ~/.ssh
|
|
|
|
|
+ - 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"
|