Commit 618ab0b61ad34f3ad57fa4758964af4915bd2cbd
Exists in
master
and in
39 other branches
Merge branch 'master' into notrac
Showing
2 changed files
with
9 additions
and
4 deletions
Show diff stats
fabfile.py
... | ... | @@ -24,7 +24,8 @@ DISTRO_CMD = { |
24 | 24 | } |
25 | 25 | |
26 | 26 | APP_USER = APP_NAME = VENV_NAME = 'colab' |
27 | -REPO_URL = 'git@github.com:colab-community/colab.git' | |
27 | +REPO_URL = 'https://github.com/colab-community/colab.git' | |
28 | +REPO_BRANCH = 'master' | |
28 | 29 | |
29 | 30 | |
30 | 31 | environments = { |
... | ... | @@ -71,6 +72,7 @@ def cmd(family, command, args=''): |
71 | 72 | def environment(name=DEFAULT_ENVIRONMENT): |
72 | 73 | """Set the environment where the tasks will be executed""" |
73 | 74 | global REPO_URL |
75 | + global REPO_BRANCH | |
74 | 76 | |
75 | 77 | try: |
76 | 78 | import project_cfg |
... | ... | @@ -78,6 +80,7 @@ def environment(name=DEFAULT_ENVIRONMENT): |
78 | 80 | pass |
79 | 81 | else: |
80 | 82 | REPO_URL = project_cfg.repository_url |
83 | + REPO_BRANCH = project_cfg.branch | |
81 | 84 | environments.update(project_cfg.environments) |
82 | 85 | |
83 | 86 | if name not in environments: |
... | ... | @@ -155,9 +158,10 @@ def update_code(): |
155 | 158 | return |
156 | 159 | |
157 | 160 | if not exists(REPO_PATH): |
158 | - run('git clone {} {}'.format(REPO_URL, REPO_PATH)) | |
161 | + run('git clone {} {} -b {}'.format(REPO_URL, REPO_PATH, REPO_BRANCH)) | |
159 | 162 | else: |
160 | 163 | with cd(REPO_PATH): |
164 | + run('git checkout {}'.format(REPO_BRANCH)) | |
161 | 165 | run('git pull') |
162 | 166 | |
163 | 167 | ... | ... |
puppet/bootstrap.py
... | ... | @@ -17,6 +17,7 @@ except ImportError: |
17 | 17 | |
18 | 18 | PUPPET_TARGET_VERSION = "3.6.2" |
19 | 19 | PUPPET_DIR = os.path.join(os.path.dirname(__file__)) |
20 | +HIERA_FILE = os.path.join(PUPPET_DIR, 'hiera.yaml') | |
20 | 21 | MODULES_FILE_PATH = os.path.join(PUPPET_DIR, 'modules.txt') |
21 | 22 | |
22 | 23 | DIST_CMD = { |
... | ... | @@ -188,8 +189,8 @@ def main(): |
188 | 189 | print('Failed installing puppet') |
189 | 190 | exit(result) |
190 | 191 | |
191 | - if os.path.isfile('/vagrant/puppet/hiera.yaml'): | |
192 | - copyfile('/vagrant/puppet/hiera.yaml', '/etc/puppet/hiera.yaml') | |
192 | + if os.path.isfile(HIERA_FILE): | |
193 | + copyfile(HIERA_FILE, '/etc/puppet/hiera.yaml') | |
193 | 194 | |
194 | 195 | install_puppet_modules() |
195 | 196 | ... | ... |