LoginSignup
1
0

More than 5 years have passed since last update.

CWL User Guide 12: Environment Variables をやってみた

Last updated at Posted at 2017-12-12

CWL User Guide 12: Environment Variables

Common Workflow Language User Guide: Environment Variables

今回は環境変数について書かれています

ツール実行時は、最小限の環境変数のみ、定義されています。
実行環境のみ適用される環境変数を定義することができます。

この回にでてくる主なキーワード

  • EnvVarRequirement

CWLファイル、

env.cwl
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
baseCommand: env
requirements:
  EnvVarRequirement:
    envDef:
      HELLO: $(inputs.message)
inputs:
  message: string
outputs: []

パラメータファイル

echo-job.yml
message: Hello world!

実行

実行方法

cwltool env.cwl echo-job.yml

実行結果

$ cwltool env.cwl echo-job.yml
/usr/local/bin/cwltool 1.0.20171107133715
Resolved 'env.cwl' to 'file:///home/vagrant/cwl_user_guide_work/12-env/env.cwl'
[job env.cwl] /tmp/tmpz4s5sH$ env
PATH=/home/vagrant/bin:/home/vagrant/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
HELLO=Hello world!
TMPDIR=/tmp/tmpHRXOIj
HOME=/tmp/tmpz4s5sH
[job env.cwl] completed success
{}
Final process status is success

今回使ったファイル

cwl_user_guide_work/12-env at master · manabuishii/cwl_user_guide_work

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0