Created
May 11, 2018 23:05
-
-
Save felipefernandes/d7ed8f99ec59253b4f89f89ca1916f07 to your computer and use it in GitHub Desktop.
Deployment Python Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
server_user = "user" | |
server_host = "localhost.domain" | |
server_path = "/var/www/html/website/" | |
# Build RSync Command line | |
args = ["rsync", "-avzH", "--exclude", ".git/ sources/", "-e", "ssh", "."] | |
args.append("%s@%s:%s"%(server_user, server_host, server_path)) | |
# run rsync | |
subprocess.call(args) | |
print "executing: " + ' '.join(args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the bitbucket-pipelines, It's returning the following error: