mirror of
https://github.com/IEEE-SB-Passau/pelican-deployment-system.git
synced 2017-09-06 16:35:38 +02:00
implement final deployment, example: rsync
This commit is contained in:
@@ -3,6 +3,11 @@ import os
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit("Not meant to be run directly!")
|
||||
|
||||
def _rsync_cmd(dest):
|
||||
cmd = ("rsync --delete-delay --recursive --times --stats "
|
||||
"'{output}/' '{dest}'")
|
||||
return cmd.format(dest=dest, output="{output}")
|
||||
|
||||
# make sure git does not block giving pw prompts, git 2.3+ only
|
||||
os.environ["GIT_TERMINAL_PROMPT"] = "0"
|
||||
|
||||
@@ -26,8 +31,10 @@ RUNNERS = {
|
||||
# branch which will be built
|
||||
"git_branch": "master",
|
||||
|
||||
# the final target, usually the wwwroot
|
||||
"target_directory": "/tmp/wwwout",
|
||||
# command which installs the generated directory tree to it's final
|
||||
# destination (the wwwroot) e.g. rsync. {output} will be replaced by
|
||||
# the path to the generator output
|
||||
"final_install_command": _rsync_cmd("/tmp/testroot"),
|
||||
|
||||
# command which builds the website
|
||||
# important: specify {output} as output path of the generator
|
||||
@@ -37,3 +44,5 @@ RUNNERS = {
|
||||
"build_env": {"PELICAN_SITEURL": "//apu:800"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user