Merge branch 'main' into 21224-project-details
[arvados.git] / sdk / python / tests / fed-migrate / jenkins.sh
1 #!/bin/bash
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: Apache-2.0
5
6 if test -z "$WORKSPACE" ; then
7     echo "WORKSPACE unset"
8     exit 1
9 fi
10
11 docker stop fedbox1 fedbox2 fedbox3
12 docker rm fedbox1 fedbox2 fedbox3
13 docker rm fedbox1-data fedbox2-data fedbox3-data
14
15 set -ex
16
17 mkdir -p "$WORKSPACE/tmp/arvbox"
18 python3 -m venv "$WORKSPACE/tmp/venv3"
19 "$WORKSPACE/tmp/venv3/bin/pip" install -e "$WORKSPACE/sdk/python" "$WORKSPACE/sdk/cwl"
20 alias cwltool='"$WORKSPACE/tmp/venv3/bin/cwltool"'
21
22 export PATH=$PATH:$WORKSPACE/tools/arvbox/bin
23
24 cd $WORKSPACE/sdk/python/tests/fed-migrate
25 cwltool arvbox-make-federation.cwl \
26         --arvbox_base $WORKSPACE/tmp/arvbox \
27         --branch $(git rev-parse HEAD) \
28         --arvbox_mode localdemo > fed.json
29
30 cwltool fed-migrate.cwl fed.json