Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

[FIX] [no task] support buildouts without bootstrap.py , with only a simple bootstrap.sh (bootstrap.py deprecated) #203

Open
wants to merge 1 commit into
base: 11.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions runbot_buildout/models/runbot_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,23 @@ def _bootstrap_buildout(self, lock_path, log_path, delete_server=True):
bootstrap_file = self.env['ir.config_parameter'].get_param(
'runbot_buildout.bootstrap_file', 'bootstrap.py',
)
if not os.path.exists(self._path(bootstrap_file)):
with open(self._path(bootstrap_file), 'w') as bootstrap:
bootstrap.write(
requests.get(
'https://raw.githubusercontent.com/buildout/buildout/'
'master/bootstrap/bootstrap.py'
).text
)
self._log('buildout', 'Bootstrapping buildout')
if not os.path.exists(self._path(bootstrap_file)):
# Python 3 buildouts don't have bootstrap.py.
# Bootstrap.py has been deprecated. this used to perform a wget,
# is now no longer working. Our new buildouts just have a
# self-sufficient bootstrap.sh. if there is no bootstrap.py, just
# execute that.
bootstrap_sh_file = self.env['ir.config_parameter'].get_param(
'runbot_buildout.bootstrap_sh_file', 'bootstrap.sh',
)
return self._spawn(
[
'.',
self._path(bootstrap_sh_file),
],
lock_path, log_path
)
return self._spawn(
[
self.branch_id.get_interpreter(),
Expand Down