Skip to content

Commit

Permalink
#61 - allow users to force build local backend after deploy (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
aalhour authored and jfri3d committed Nov 4, 2019
1 parent 106633a commit e638d28
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions cli/kaos_cli/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,18 @@ def build(backend: BackendFacade, cloud, env, force, verbose, yes, local_backend

# validate unused port for DOCKER
if cloud == DOCKER and not validate_unused_port(80):
click.echo(
"{} - Network port {} is used but is needed for building {} backend in {}".format(
click.style("Warning", bold=True, fg='yellow'),
click.style("80", bold=True),
click.style("kaos", bold=True),
click.style(cloud, bold=True, fg='red')))

sys.exit(1)
# If the force build flag was set to True and the kaos backend
# was already built then skip the warning; otherwise, warn
# the user that the port is already taken by another service
# and issue a sys exit
if not (force and backend.is_created()):
click.echo(
"{} - Network port {} is used but is needed for building {} backend in {}".format(
click.style("Warning", bold=True, fg='yellow'),
click.style("80", bold=True),
click.style("kaos", bold=True),
click.style(cloud, bold=True, fg='red')))
sys.exit(1)

try:

Expand Down

0 comments on commit e638d28

Please sign in to comment.