Merge "Return full structure of std info in Linux class methods"

This commit is contained in:
Jenkins 2015-10-09 16:35:09 +00:00 committed by Gerrit Code Review
commit 256bb98102
3 changed files with 30 additions and 10 deletions

View File

@ -15,6 +15,16 @@ Methods:
- helpText:
Contract: $.string()
Default: null
- captureStderr:
Contract: $.bool().notNull()
Default: true
- captureStdout:
Contract: $.bool().notNull()
Default: true
- ignoreErrors:
Contract: $.bool().notNull()
Default: false
Body:
- $resources: new(sys:Resources)
- If: $helpText != null
@ -24,9 +34,12 @@ Methods:
- $planName: format('Execute {0}', $command)
- $template: $resources.yaml('RunCommand.template').bind(dict(
command => $command,
planName => $planName
planName => $planName,
captureStderr => $captureStderr,
captureStdout => $captureStdout,
verifyExitcode => not $ignoreErrors
))
- $agent.call($template, $resources)
- Return: $agent.call($template, $resources)
putFile:
Arguments:
@ -39,6 +52,10 @@ Methods:
- helpText:
Contract: $.string()
Default: null
- ignoreErrors:
Contract: $.bool().notNull()
Default: false
Body:
- $data: base64encode($fileContent)
- $resources: new(sys:Resources)
@ -50,6 +67,7 @@ Methods:
- $template: $resources.yaml('PutFile.template').bind(dict(
path => $path,
fileContent => $data,
planName => $planName
planName => $planName,
verifyExitcode => not $ignoreErrors
))
- $agent.call($template, $resources)
- Return: $agent.call($template, $resources)

View File

@ -6,7 +6,7 @@ Parameters:
path: $path
Body: |
return putFile("'{0}'".format(args.path)).exitCode
return putFile("'{0}'".format(args.path)).exitCode == 0
Files:
destinationFile:
@ -22,5 +22,6 @@ Scripts:
Files:
- destinationFile
Options:
captureStdout: true
captureStderr: true
captureStdout: false
captureStderr: true
verifyExitcode: $verifyExitcode

View File

@ -6,7 +6,7 @@ Parameters:
command: $command
Body: |
return runCommand("'{0}'".format(args.command)).exitCode
return runCommand("'{0}'".format(args.command))
Scripts:
runCommand:
@ -15,5 +15,6 @@ Scripts:
EntryPoint: runCommand.sh
Files: []
Options:
captureStdout: true
captureStderr: true
captureStdout: $captureStdout
captureStderr: $captureStderr
verifyExitcode: $verifyExitcode