diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-01-13 12:01:40 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-01-13 12:01:40 +0200 |
commit | 1147faa895382c1ed64f3334fd6a7ab8e3b550be (patch) | |
tree | 9347d291cb3781db47ef7f02a3638af93cb78ab2 /scripts | |
parent | 1408272f7736ca1ac0e2114da9221543cb9e2a82 (diff) | |
download | vaadin-framework-1147faa895382c1ed64f3334fd6a7ab8e3b550be.tar.gz vaadin-framework-1147faa895382c1ed64f3334fd6a7ab8e3b550be.zip |
Fix demo and archetype build scripts to deploy all wars at once
Change-Id: I5ddf43d0c895404abf2139c847ac805ef08452c8
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/BuildArchetypes.py | 22 | ||||
-rw-r--r-- | scripts/BuildDemos.py | 18 |
2 files changed, 27 insertions, 13 deletions
diff --git a/scripts/BuildArchetypes.py b/scripts/BuildArchetypes.py index fa6dba2c56..98fe787d77 100644 --- a/scripts/BuildArchetypes.py +++ b/scripts/BuildArchetypes.py @@ -73,6 +73,8 @@ if __name__ == "__main__": if hasattr(args, "artifactPath") and args.artifactPath is not None: raise Exception("Archetype validation build does not support artifactPath") + wars = {} + for archetype in archetypes: artifactId = "test-%s-%s" % (archetype, args.version.replace(".", "-")) try: @@ -82,15 +84,23 @@ if __name__ == "__main__": mavenValidate(artifactId, logFile=log) warFiles = copyWarFiles(artifactId, name=archetype) for war in warFiles: - try: - deployWar(war, "%s.war" % (getDeploymentContext(archetype, args.version))) - except Exception as e: - print("War %s failed to deploy: %s" % (war, e)) - archetypesFailed = True + wars[war] = "%s.war" % (getDeploymentContext(archetype, args.version)) + print("%s validation succeeded!" % (archetype)) except Exception as e: print("Archetype %s build failed:" % (archetype), e) archetypesFailed = True -# removeDir(artifactId) + try: + removeDir(artifactId) + except: + pass print("") + + for i in wars: + try: + deployWar(i, wars[i]) + except Exception as e: + print("War %s failed to deploy: %s" % (war, e)) + archetypesFailed = True + if archetypesFailed: sys.exit(1) diff --git a/scripts/BuildDemos.py b/scripts/BuildDemos.py index 8b7aaecf30..7099230339 100644 --- a/scripts/BuildDemos.py +++ b/scripts/BuildDemos.py @@ -65,6 +65,8 @@ if __name__ == "__main__": demosFailed = False ignoredDemos = args.ignore.split(",") + wars = [] + for demo in demos: print("Validating demo %s" % (demo)) try: @@ -76,13 +78,7 @@ if __name__ == "__main__": if hasattr(args, "repo") and args.repo is not None: updateRepositories(join(resultPath, demo), args.repo) mavenValidate(demo, logFile=getLogFile(demo)) - resultWars = copyWarFiles(demo) - for war in resultWars: - try: - deployWar(war) - except Exception as e: - print("War %s failed to deploy: %s" % (war, e)) - demosFailed = True + wars.extend(copyWarFiles(demo)) print("%s demo validation succeeded!" % (demo)) except Exception as e: print("%s demo validation failed: %s" % (demo, e)) @@ -97,5 +93,13 @@ if __name__ == "__main__": except: pass print("") + + for war in wars: + try: + deployWar(war) + except Exception as e: + print("War %s failed to deploy: %s" % (war, e)) + demosFailed = True + if demosFailed: sys.exit(1) |