Skip to content

Commit 6432210

Browse files
author
Alan Christie
committed
- Fix Docker execution for ${PIN}file
And adds comment for its use
1 parent 6adfd03 commit 6432210

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/groovy/ContainerExecutor.groovy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ class ContainerExecutor {
4848
StringBuilder sout = new StringBuilder()
4949
StringBuilder serr = new StringBuilder()
5050

51+
// Note: PIN and POUT have trailing forward-slashed for now
52+
// to allow a migratory use of $PIN}file references
53+
// rather than insisting on ${PIN}/file which would fail if
54+
// PIN wasn't defined - it's about lowest risk changes.
55+
5156
String cmd = "docker run -v $pin:/data -v $pout:/output" +
52-
" -w /output -e PIN=/data -e POUT=/output $imageName" +
57+
" -w /output -e PIN=/data/ -e POUT=/output/ $imageName" +
5358
" sh -c '$command'"
5459

5560
def proc = ['sh', '-c', cmd].execute(null, new File('.'))

src/groovy/Tester.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ class Tester {
676676

677677
// Redirect output
678678
String outputFileBaseName = oOption[0][1]
679-
String testOutputFile = '\\${POUT}' + File.separator + outputFileBaseName
679+
String testOutputFile = '\\${POUT}' + outputFileBaseName
680680
// Now swap-out the original '-o'...
681681
String redirectedOutputOption = "-o ${testOutputFile}"
682682
pipelineCommand = pipelineCommand.replaceAll(/$outputRegex/,

0 commit comments

Comments
 (0)