1
0
mirror of https://github.com/IEEE-SB-Passau/pelican-deployment-system.git synced 2017-09-06 16:35:38 +02:00
Files
pelican-deployment-system/deploy_config.py

49 lines
1.7 KiB
Python
Raw Normal View History

2016-06-11 00:51:12 +02:00
import os
2016-06-10 21:59:52 +02:00
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}")
2016-06-11 22:04:27 +02:00
# make sure git does not block giving pw prompts, git 2.3+ only
2016-06-11 00:51:12 +02:00
os.environ["GIT_TERMINAL_PROMPT"] = "0"
2016-06-12 04:17:54 +02:00
# needs to be a byte like object
GITHUB_SECRET = b"changetosomethingrandomlong"
2016-06-10 21:59:52 +02:00
RUNNERS = {
2016-06-12 04:17:54 +02:00
# unique name of the runner, avoid spaces and other obscure characters
2016-06-10 21:59:52 +02:00
"website_master": {
2016-06-11 22:04:27 +02:00
# directory where building takes place, will be created if not there
# multiple runners may point to the same one
2016-06-10 21:59:52 +02:00
"working_directory": "/tmp/test",
2016-06-11 22:04:27 +02:00
# upstream url of the repository which contains the website
# use https://git::@github.com... to avoid pw prompts and instead fail
# (e.g. if github gives errornously 401 temporarily, git would block)
# os.environ["GIT_TERMINAL_PROMPT"] = "0" does the same but git 2.3+only
"clone_url": "https://git::@github.com/IEEE-SB-Passau/pelican-ieee-passau.git",
# branch which will be built
2016-06-10 21:59:52 +02:00
"git_branch": "master",
2016-06-11 22:04:27 +02:00
# 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"),
2016-06-11 22:04:27 +02:00
# command which builds the website
# important: specify {output} as output path of the generator
2016-06-12 22:54:09 +02:00
"build_command": 'tox -e pelican --recreate -- -d --output "{output}"',
2016-06-11 22:04:27 +02:00
# will be added to env when running build_command
"build_env": {"PELICAN_SITEURL": "//apu:800"}
2016-06-10 21:59:52 +02:00
}
}