Skip to content

Commit 6857a20

Browse files
committed
manage to install dependecies before generating revision
Signed-off-by: Javan Lacerda <[email protected]>
1 parent d83cca2 commit 6857a20

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/local/butler/deploy.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,11 +566,14 @@ def execute(args):
566566
sys.exit(1)
567567

568568
if args.staging:
569+
common.install_dependencies('linux')
569570
revision = common.compute_staging_revision()
570571
platforms = ['linux'] # No other platforms required.
571572
elif args.prod:
572-
revision = common.compute_prod_revision()
573573
platforms = list(constants.PLATFORMS.keys())
574+
for platform in platforms:
575+
common.install_dependencies(platform)
576+
revision = common.compute_prod_revision()
574577
else:
575578
print('Please specify either --prod or --staging. For production '
576579
'deployments, you probably want to use deploy.sh from your '
@@ -591,7 +594,10 @@ def execute(args):
591594
if deploy_zips:
592595
for platform_name in platforms:
593596
package_zip_paths += package.package(
594-
revision, platform_name=platform_name, release=args.release)
597+
revision,
598+
platform_name=platform_name,
599+
release=args.release,
600+
should_install_dependencies=False)
595601
else:
596602
# package.package calls these, so only set these up if we're not packaging,
597603
# since they can be fairly slow.

src/local/butler/package.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def package(revision,
7373
target_zip_dir=constants.PACKAGE_TARGET_ZIP_DIRECTORY,
7474
target_manifest_path=constants.PACKAGE_TARGET_MANIFEST_PATH,
7575
platform_name=None,
76-
release='prod'):
76+
release='prod',
77+
should_install_dependencies=True):
7778
"""Prepare clusterfuzz-source.zip."""
7879
is_ci = os.getenv('TEST_BOT_ENVIRONMENT')
7980
if not is_ci and common.is_git_dirty():
@@ -84,7 +85,8 @@ def package(revision,
8485
print('You do not have nodejs, or your nodejs is not at least version 4.')
8586
sys.exit(1)
8687

87-
common.install_dependencies(platform_name=platform_name)
88+
if should_install_dependencies:
89+
common.install_dependencies(platform_name=platform_name)
8890

8991
# This needs to be done before packaging step to let src/appengine/config be
9092
# archived for bot.

0 commit comments

Comments
 (0)