Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate default workdir for newly created steps #502

Merged
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Propagate default workdir for newly created steps

The StepsYAMLParsingStep is statically in the step list of the factory,
so when starting a build Buildbot will call `setDefaultWorkdir` on each
step. We need to save this value and propagate it to the steps we
create on the fly to ensure they also receive a workdir value.
  • Loading branch information
aneeshusa committed Oct 3, 2016
commit 8c5bc71dbd94a863e129f606ca2978a2ddf55f7f
@@ -167,6 +167,7 @@ class StepsYAMLParsingStep(buildstep.ShellMixin, buildstep.BuildStep):

haltOnFailure = True
flunkOnFailure = True
workdir = None

def __init__(self, builder_name, environment, yaml_path, **kwargs):
kwargs = self.setupShellMixin(kwargs)
@@ -175,6 +176,10 @@ def __init__(self, builder_name, environment, yaml_path, **kwargs):
self.environment = environment
self.yaml_path = yaml_path

def setDefaultWorkdir(self, workdir):
buildstep.BuildStep.setDefaultWorkdir(self, workdir)
self.workdir = workdir

@defer.inlineCallbacks
def run(self):
self.is_windows = re.match('windows.*', self.builder_name) is not None
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.