added stop Force in npm

This commit is contained in:
Andrei Yankovich 2019-07-23 17:13:55 +03:00
parent fca361f92e
commit 378076fef5

View File

@ -8,6 +8,10 @@ import os
import subprocess import subprocess
from BuildBotLib.secretManager import * from BuildBotLib.secretManager import *
def isStopForce(step):
return step.getProperty('stopForce');
def getFactory(): def getFactory():
factory = base.getFactory(); factory = base.getFactory();
@ -41,6 +45,7 @@ def getFactory():
'npm', 'npm',
"i" "i"
], ],
doStepIf = lambda step : not isStopForce(step),
haltOnFailure = True, haltOnFailure = True,
name = 'npm install', name = 'npm install',
description = 'install all dependecies', description = 'install all dependecies',
@ -53,6 +58,7 @@ def getFactory():
'npm', 'npm',
"start" "start"
], ],
doStepIf = lambda step : not isStopForce(step),
haltOnFailure = True, haltOnFailure = True,
name = 'npm start', name = 'npm start',
description = 'install new versio to server', description = 'install new versio to server',
@ -66,4 +72,9 @@ def getRepo():
def getPropertyes(): def getPropertyes():
return [ return [
util.BooleanParameter(
name = 'stopForce',
label = 'Stop Force',
default = False
)
] ]