15531: Test federation migrate script WIP
[arvados.git] / sdk / python / tests / fed-migrate / run-test.cwl
1 #!/usr/bin/env cwl-runner
2 class: Workflow
3 cwlVersion: v1.0
4 id: '#main'
5 inputs:
6   - id: arvados_api_hosts
7     type:
8       items: string
9       type: array
10   - id: superuser_tokens
11     type:
12       items: string
13       type: array
14   - default: arv-federation-migrate
15     id: fed_migrate
16     type: string
17 outputs:
18   - id: out
19     outputSource: main_2/out
20     type: File
21 requirements:
22   InlineJavascriptRequirement: {}
23   MultipleInputFeatureRequirement: {}
24   ScatterFeatureRequirement: {}
25   StepInputExpressionRequirement: {}
26   SubworkflowFeatureRequirement: {}
27 steps:
28   - id: main_1
29     in:
30       arvados_api_hosts:
31         source: arvados_api_hosts
32       create_users:
33         default:
34           class: File
35           location: create_users.py
36       superuser_tokens:
37         source: superuser_tokens
38     out:
39       - ar
40     run:
41       arguments:
42         - python
43         - $(inputs.create_users)
44         - _script
45       class: CommandLineTool
46       id: main_1_embed
47       inputs:
48         - id: arvados_api_hosts
49           type:
50             items: string
51             type: array
52         - id: superuser_tokens
53           type:
54             items: string
55             type: array
56         - id: create_users
57           type: File
58       outputs:
59         - id: ar
60           outputBinding:
61             outputEval: $(inputs.arvados_api_hosts)
62           type:
63             items: string
64             type: array
65       requirements:
66         InitialWorkDirRequirement:
67           listing:
68             - entry: |
69                 {
70                   "arvados_api_hosts": $(inputs.arvados_api_hosts),
71                   "superuser_tokens": $(inputs.superuser_tokens)
72                 }
73               entryname: _script
74         InlineJavascriptRequirement: {}
75   - id: main_2
76     in:
77       ar:
78         source: main_1/ar
79       arvados_api_hosts:
80         source: arvados_api_hosts
81       fed_migrate:
82         source: fed_migrate
83       host:
84         valueFrom: '$(inputs.arvados_api_hosts[0])'
85       superuser_tokens:
86         source: superuser_tokens
87       token:
88         valueFrom: '$(inputs.superuser_tokens[0])'
89     out:
90       - out
91     run:
92       arguments:
93         - $(inputs.fed_migrate)
94         - '--report'
95         - out
96       class: CommandLineTool
97       id: main_2_embed
98       inputs:
99         - id: arvados_api_hosts
100           type:
101             items: string
102             type: array
103         - id: superuser_tokens
104           type:
105             items: string
106             type: array
107         - id: ar
108           type:
109             items: string
110             type: array
111         - id: fed_migrate
112           type: string
113         - id: host
114           type: Any
115         - id: token
116           type: Any
117       outputs:
118         - id: out
119           outputBinding:
120             glob: out
121           type: File
122       requirements:
123         - class: EnvVarRequirement
124           envDef:
125             ARVADOS_API_HOST: $(inputs.host)
126             ARVADOS_API_TOKEN: $(inputs.token)
127