Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio committed Nov 19, 2019
1 parent 43005f3 commit cffb413
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion brick/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ def deploy(ctx, target):
logger.info('Nothing to deploy')
return

step = steps['deploy']

# Make sure to run the previous step
if 'test' in steps:
previous_tag = ctx.invoke(test, target=target)
Expand All @@ -332,7 +334,16 @@ def deploy(ctx, target):
else:
raise Exception('Could not detect previous step')

step = steps['deploy']
# Push image if needed
if step.get('push_image') is True and steps.get('build', {}).get('tag'):
tag = steps['build']['tag']
logger.info(f'📡 Pushing {tag}..')
for line in docker_client.images.push(tag, stream=True, decode=True):
logger.debug(line)

if 'inputs' not in step and 'command' not in step:
return

inputs = expand_inputs(target_rel_path, step.get('inputs', []))
dockerfile_contents = '# syntax = docker/dockerfile:experimental\n'
inputs_from_build = None
Expand Down

0 comments on commit cffb413

Please sign in to comment.