Skip to content

Fix an example of Section7 not to use side effect #92

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

Merged
merged 4 commits into from
Feb 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ branches:
- /.*/

before_script:
- git clone https://github.com/common-workflow-language/cwltool.git cwltool && pip install ./cwltool
- git clone https://github.com/common-workflow-language/cwltest.git cwltest && pip install ./cwltest
- pip install cwltool cwltest html5lib

script:
- make RUNNER=cwltool unittest-examples
18 changes: 14 additions & 4 deletions _episodes/07-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $ cwl-runner docker.cwl docker-job.yml
-i \
--volume=/tmp/tmpgugLND:/var/spool/cwl:rw \
--volume=/tmp/tmpSs5JoN:/tmp:rw \
--volume=/home/me/cwl/user_guide/hello.js:/var/lib/cwl/stg16848d97-e6ba-4b35-b666-4546d9965a2d/hello.js:ro \
--volume=/home/me/cwl/user_guide/hello.js:/var/lib/cwl/job369354770_examples/hello.js:ro \
--workdir=/var/spool/cwl \
--read-only=true \
--user=1000 \
Expand All @@ -62,11 +62,21 @@ $ cwl-runner docker.cwl docker-job.yml
--env=HOME=/var/spool/cwl \
node:slim \
node \
/var/lib/cwl/stg16848d97-e6ba-4b35-b666-4546d9965a2d/hello.js
Hello World
/var/lib/cwl/job369354770_examples/hello.js > /tmp/tmpgugLND/output.txt
[job docker.cwl] completed success
{}
{
"output": {
"location": "file:///home/me/cwl/user_guide/output.txt",
"basename": "output.txt",
"class": "File",
"checksum": "sha1$648a6a6ffffdaa0badb23b8baf90b6168dd16b3a",
"size": 12,
"path": "/home/me/cwl/user_guide/output.txt"
}
}
Final process status is success
$ cat output.txt
Hello World
~~~
{: .output}

Expand Down
5 changes: 4 additions & 1 deletion _includes/cwl/07-containers/docker.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ inputs:
type: File
inputBinding:
position: 1
outputs: []
outputs:
output:
type: stdout
stdout: output.txt
12 changes: 11 additions & 1 deletion _includes/cwl/conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,17 @@
location: Any
size: 0

# Section 7 depends on side-effects
# Section 7
- doc: Test for section 7
job: 07-containers/docker-job.yml
tool: 07-containers/docker.cwl
output:
output:
class: File
checksum: sha1$648a6a6ffffdaa0badb23b8baf90b6168dd16b3a
basename: output.txt
location: Any
size: 12

# Section 8
- doc: Test for section 8
Expand Down