From 964124eb21c91993da485b593686165719e66904 Mon Sep 17 00:00:00 2001 From: Francesco Uliana Date: Thu, 17 Dec 2015 16:25:10 +0100 Subject: [PATCH] build: added support for no_cache and pull, issue #13 --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 18aebe2..2ce84c9 100644 --- a/main.py +++ b/main.py @@ -161,8 +161,13 @@ def build(): """ docker-compose build """ - name = loads(request.data)["id"] - get_project_with_name(name).build() + json = loads(request.data) + name = json["id"] + + dic = dict(no_cache=json["no_cache"] if "no_cache" in json else None, pull=json["pull"] if "pull" in json else None) + + get_project_with_name(name).build(**dic) + return jsonify(command='build') @app.route(API_V1 + "create", methods=['POST'])