Remove timeout in archetype (#175)
This commit is contained in:
Родитель
0197f57a05
Коммит
ff2e1fd687
|
@ -34,7 +34,7 @@ def triggerParameter = templateMap.keySet().stream()
|
|||
.filter({ key -> key.equalsIgnoreCase(trigger) || key.substring(0, key.lastIndexOf("Trigger")).equalsIgnoreCase(trigger) }).findFirst()
|
||||
.map(templateMap.&get)
|
||||
.orElseThrow({ -> new RuntimeException(String.format("Invalid trigger type `%s`, supported values are %s and HttpTrigger", trigger, String.join(",", templateMap.keySet()))) })
|
||||
println("Generating trigger from template, please replace the values with placeholder in annotation with real value if necessary")
|
||||
println("Generating trigger from template, which may take some moments. Please replace the values with placeholder in annotation with real value if necessary")
|
||||
def pomFile = new File(rootDir, "pom.xml")
|
||||
def isWindows = System.properties['os.name'].toLowerCase().contains('windows')
|
||||
def starter = isWindows ? "cmd.exe" : "/bin/sh"
|
||||
|
@ -46,7 +46,7 @@ if (!isWindows) {
|
|||
def output = new StringBuilder()
|
||||
def proc = [starter, switcher, command].execute();
|
||||
proc.consumeProcessOutput(output, output)
|
||||
proc.waitForOrKill(60 * 1000); // wait for 60s
|
||||
proc.waitFor()
|
||||
if (proc.exitValue() != 0 || output == null || !output.contains("BUILD SUCCESS")) {
|
||||
println("${output}")
|
||||
throw new RuntimeException("Failed to generate target trigger, please run `mvn azure-functions:add` manually in project root")
|
||||
|
|
Загрузка…
Ссылка в новой задаче