Skip to content

Commit 8838f3e

Browse files
authored
Merge pull request #92 from tom-tan/fix-side-effects-07
Fix an example of Section7 not to use side effect
2 parents e35459a + cc077d2 commit 8838f3e

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

_episodes/07-containers.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $ cwl-runner docker.cwl docker-job.yml
5353
-i \
5454
--volume=/tmp/tmpgugLND:/var/spool/cwl:rw \
5555
--volume=/tmp/tmpSs5JoN:/tmp:rw \
56-
--volume=/home/me/cwl/user_guide/hello.js:/var/lib/cwl/stg16848d97-e6ba-4b35-b666-4546d9965a2d/hello.js:ro \
56+
--volume=/home/me/cwl/user_guide/hello.js:/var/lib/cwl/job369354770_examples/hello.js:ro \
5757
--workdir=/var/spool/cwl \
5858
--read-only=true \
5959
--user=1000 \
@@ -62,11 +62,21 @@ $ cwl-runner docker.cwl docker-job.yml
6262
--env=HOME=/var/spool/cwl \
6363
node:slim \
6464
node \
65-
/var/lib/cwl/stg16848d97-e6ba-4b35-b666-4546d9965a2d/hello.js
66-
Hello World
65+
/var/lib/cwl/job369354770_examples/hello.js > /tmp/tmpgugLND/output.txt
6766
[job docker.cwl] completed success
68-
{}
67+
{
68+
"output": {
69+
"location": "file:///home/me/cwl/user_guide/output.txt",
70+
"basename": "output.txt",
71+
"class": "File",
72+
"checksum": "sha1$648a6a6ffffdaa0badb23b8baf90b6168dd16b3a",
73+
"size": 12,
74+
"path": "/home/me/cwl/user_guide/output.txt"
75+
}
76+
}
6977
Final process status is success
78+
$ cat output.txt
79+
Hello World
7080
~~~
7181
{: .output}
7282

_includes/cwl/07-containers/docker.cwl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ inputs:
1111
type: File
1212
inputBinding:
1313
position: 1
14-
outputs: []
14+
outputs:
15+
output:
16+
type: stdout
17+
stdout: output.txt

_includes/cwl/conformance-test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@
4848
location: Any
4949
size: 0
5050

51-
# Section 7 depends on side-effects
51+
# Section 7
52+
- doc: Test for section 7
53+
job: 07-containers/docker-job.yml
54+
tool: 07-containers/docker.cwl
55+
output:
56+
output:
57+
class: File
58+
checksum: sha1$648a6a6ffffdaa0badb23b8baf90b6168dd16b3a
59+
basename: output.txt
60+
location: Any
61+
size: 12
5262

5363
# Section 8
5464
- doc: Test for section 8

0 commit comments

Comments
 (0)