1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
8 arv: "http://arvados.org/cwl#"
9 cwltool: "http://commonwl.org/cwltool#"
11 container_name: string
12 arvbox_data: Directory
28 var sp = self[0].contents.split("\n");
29 for (var i = 0; i < sp.length; i++) {
30 if (sp[i].startsWith("Cluster id: ")) {
31 return sp[i].substr(12);
42 var sp = self[0].contents.split("\n");
43 for (var i = 0; i < sp.length; i++) {
44 if (sp[i].startsWith("Container IP: ")) {
45 return sp[i].substr(14)+":8000";
52 glob: superuser_token.txt
54 outputEval: $(self[0].contents.trim())
58 outputEval: $(inputs.arvbox_data)
62 ARVBOX_CONTAINER: $(inputs.container_name)
63 ARVBOX_DATA: $(inputs.arvbox_data.path)
64 ShellCommandRequirement: {}
65 InitialWorkDirRequirement:
67 - entry: $(inputs.arvbox_data)
68 entryname: $(inputs.container_name)
70 InplaceUpdateRequirement:
72 InlineJavascriptRequirement: {}
77 if test $(inputs.arvbox_mode) = dev ; then
79 if ! test -d $ARVBOX_DATA/arvados ; then
81 git clone https://git.arvados.org/arvados.git
83 cd $ARVBOX_DATA/arvados
84 gitver=`git rev-parse HEAD`
86 git checkout -f $(inputs.branch)
88 pulled=`git rev-parse HEAD`
89 git --no-pager log -n1 $pulled
91 export ARVBOX_BASE=$(runtime.tmpdir)
95 if test "$gitver" = "$pulled" ; then
96 $(inputs.arvbox_bin.path) start $(inputs.arvbox_mode)
98 $(inputs.arvbox_bin.path) restart $(inputs.arvbox_mode)
100 $(inputs.arvbox_bin.path) status > status.txt
101 $(inputs.arvbox_bin.path) cat /var/lib/arvados-arvbox/superuser_token > superuser_token.txt