Selaa lähdekoodia

Fix demo and archetype build scripts to deploy all wars at once

Change-Id: I5ddf43d0c895404abf2139c847ac805ef08452c8
tags/7.7.0.alpha1
Teemu Suo-Anttila 8 vuotta sitten
vanhempi
commit
1147faa895
2 muutettua tiedostoa jossa 27 lisäystä ja 13 poistoa
  1. 16
    6
      scripts/BuildArchetypes.py
  2. 11
    7
      scripts/BuildDemos.py

+ 16
- 6
scripts/BuildArchetypes.py Näytä tiedosto

if hasattr(args, "artifactPath") and args.artifactPath is not None: if hasattr(args, "artifactPath") and args.artifactPath is not None:
raise Exception("Archetype validation build does not support artifactPath") raise Exception("Archetype validation build does not support artifactPath")


wars = {}

for archetype in archetypes: for archetype in archetypes:
artifactId = "test-%s-%s" % (archetype, args.version.replace(".", "-")) artifactId = "test-%s-%s" % (archetype, args.version.replace(".", "-"))
try: try:
mavenValidate(artifactId, logFile=log) mavenValidate(artifactId, logFile=log)
warFiles = copyWarFiles(artifactId, name=archetype) warFiles = copyWarFiles(artifactId, name=archetype)
for war in warFiles: 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: except Exception as e:
print("Archetype %s build failed:" % (archetype), e) print("Archetype %s build failed:" % (archetype), e)
archetypesFailed = True archetypesFailed = True
# removeDir(artifactId)
try:
removeDir(artifactId)
except:
pass
print("") 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: if archetypesFailed:
sys.exit(1) sys.exit(1)

+ 11
- 7
scripts/BuildDemos.py Näytä tiedosto

demosFailed = False demosFailed = False
ignoredDemos = args.ignore.split(",") ignoredDemos = args.ignore.split(",")
wars = []

for demo in demos: for demo in demos:
print("Validating demo %s" % (demo)) print("Validating demo %s" % (demo))
try: try:
if hasattr(args, "repo") and args.repo is not None: if hasattr(args, "repo") and args.repo is not None:
updateRepositories(join(resultPath, demo), args.repo) updateRepositories(join(resultPath, demo), args.repo)
mavenValidate(demo, logFile=getLogFile(demo)) 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)) print("%s demo validation succeeded!" % (demo))
except Exception as e: except Exception as e:
print("%s demo validation failed: %s" % (demo, e)) print("%s demo validation failed: %s" % (demo, e))
except: except:
pass pass
print("") 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: if demosFailed:
sys.exit(1) sys.exit(1)

Loading…
Peruuta
Tallenna