4
0
mirror of https://github.com/QuasarApp/QuasarAppCI.git synced 2025-05-05 17:59:38 +00:00

try fix git step

This commit is contained in:
Andrei Yankovich 2021-03-30 18:24:33 +03:00
parent 8f3f95f64f
commit f81565e4e6

@ -259,41 +259,19 @@ class Make(BaseModule):
def getFactory(self):
factory = super().getFactory()
def getPreviousStepStatus(steps):
steps_status = steps.build.getStatus().getSteps()
self_status_index = steps_status.index(steps.step_status)
if self_status_index == 0:
return (None, 0)
return steps_status[self_status_index - 1].results
def doForce(steps):
return getPreviousStepStatus(steps)
factory.addSteps([
steps.Git(
repourl=util.Interpolate('%(prop:repository)s'),
branch=util.Interpolate('%(prop:branch)s'),
mode='full',
method='fresh',
submodules=True,
warnOnFailure=True,
haltOnFailure=False,
name='git operations',
description='operations of git like pull clone fetch',
),
steps.Git(
repourl=util.Interpolate('%(prop:repository)s'),
branch=util.Interpolate('%(prop:branch)s'),
mode='full',
method='clobber',
submodules=True,
name='git operations force',
doStepIf=doForce,
description='operations of git like pull clone' +
'fetch (force remove all old data)',
)
]
factory.addStep(
steps.Git(
repourl=util.Interpolate('%(prop:repository)s'),
branch=util.Interpolate('%(prop:branch)s'),
mode='full',
method='fresh',
submodules=True,
warnOnFailure=True,
haltOnFailure=False,
retryFetch=True,
name='git operations',
description='operations of git like pull clone fetch',
)
)
# factory.addStep(self.checkSupportedBuildSystems())