From 5e3f81cff9e1c47c982a8668eeea62b27e50aa6a Mon Sep 17 00:00:00 2001 From: Josue Gomez Date: Thu, 1 Jun 2023 20:33:50 -0600 Subject: [PATCH] first commit --- bitbucket-pipelines.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bitbucket-pipelines.yml diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 0000000..79f3036 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,15 @@ +image: python:3.9 + +pipelines: + branches: + development: + - step: + name: Compress and Deploy to Develop Server + deployment: development + script: + - apt-get update && apt-get install -y sshpass git + - ls -halF + - curl ipinfo.io/ip + - git archive --format=tar HEAD | gzip > locale_bundle.tar.gz + - sshpass -p $DEVELOP_SERVER_PASSWORD scp -o StrictHostKeyChecking=no locale_bundle.tar.gz $DEVELOP_SERVER_USERNAME@$DEVELOP_SERVER_IP:/app + - sshpass -p $DEVELOP_SERVER_PASSWORD ssh -o StrictHostKeyChecking=no $DEVELOP_SERVER_USERNAME@$DEVELOP_SERVER_IP "cd /app && rm -rf sic_locale && tar -xzf /app/locale_bundle.tar.gz -C /app/sic_locale && source /app/venv/bin/activate && cd /app/sicweb && python manage.py compilemessages && sudo systemctl restart sicweb.policies.service && sudo systemctl restart sicweb.service"