diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-08-16 15:00:58 +0300 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-08-16 15:00:58 +0300 |
commit | 318fb10f6a4ad9cc1cd7f31f574fa4c50eec951e (patch) | |
tree | 38c7a8ac3671760f1396b9a2e5be0d7b6bc10531 /scripts/BuildDemos.py | |
parent | 4cd7965fda54a124ea01066b5e9f6d9ee124ab1b (diff) | |
download | vaadin-framework-318fb10f6a4ad9cc1cd7f31f574fa4c50eec951e.tar.gz vaadin-framework-318fb10f6a4ad9cc1cd7f31f574fa4c50eec951e.zip |
Build docker image for testing demos (#9826)
This patch allows the demo build script to wrap the resulting war files into docker image. The image contains a jetty with the provided war files deployed on start.
Diffstat (limited to 'scripts/BuildDemos.py')
-rw-r--r-- | scripts/BuildDemos.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/scripts/BuildDemos.py b/scripts/BuildDemos.py index fd4c84fc32..f691f851d0 100644 --- a/scripts/BuildDemos.py +++ b/scripts/BuildDemos.py @@ -44,7 +44,7 @@ if __name__ == "__main__": log_status("BuildDemos depends on gitpython. Install it with `pip install gitpython`") dump_status(True) sys.exit(1) - from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs, mavenInstall, resultPath, readPomFile, parser + from BuildHelpers import updateRepositories, mavenValidate, copyWarFiles, getLogFile, removeDir, getArgs, mavenInstall, resultPath, readPomFile, parser, dockerWrap from DeployHelpers import deployWar # Add command line agrument for ignoring failing demos parser.add_argument("--ignore", type=str, help="Ignored demos", default="") @@ -82,12 +82,16 @@ if __name__ == "__main__": pass print("") - for war in wars: - try: - deployWar(war) - except Exception as e: - log_status("War %s failed to deploy: %s" % (war, e)) - demosFailed = True + if args.deploy_mode: + for war in wars: + try: + deployWar(war) + except Exception as e: + log_status("War %s failed to deploy: %s" % (war, e)) + demosFailed = True + else: + dockerWrap(args.version) + if demosFailed: dump_status(True) |