Skip to content

Commit 8d3f692

Browse files
authored
Merge branch 'master' into testing-windows
2 parents b63d472 + 9a7047b commit 8d3f692

File tree

2 files changed

+42
-15
lines changed

2 files changed

+42
-15
lines changed

cwltool/update.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import traceback
66
from typing import (Any, Callable, Dict, Text, # pylint: disable=unused-import
77
Tuple, Union)
8+
from copy import deepcopy
89

910
import six
1011
from six.moves import urllib
@@ -349,6 +350,7 @@ def _draft3toDraft4dev1(doc, loader, baseuri):
349350
# type: (Any, Loader, Text) -> Any
350351
if isinstance(doc, dict):
351352
if "class" in doc and doc["class"] == "Workflow":
353+
352354
def fixup(f): # type: (Text) -> Text
353355
doc, frg = urllib.parse.urldefrag(f)
354356
frg = '/'.join(frg.rsplit('.', 1))
@@ -371,6 +373,8 @@ def fixup(f): # type: (Text) -> Text
371373
for out in doc["outputs"]:
372374
out["source"] = fixup(out["source"])
373375
for key, value in doc.items():
376+
if key == 'run':
377+
value = deepcopy(value)
374378
doc[key] = _draft3toDraft4dev1(value, loader, baseuri)
375379
elif isinstance(doc, list):
376380
for i, a in enumerate(doc):
@@ -393,6 +397,8 @@ def _draft4Dev1toDev2(doc, loader, baseuri):
393397
out["outputSource"] = out["source"]
394398
del out["source"]
395399
for key, value in doc.items():
400+
if key == 'run':
401+
value = deepcopy(value)
396402
doc[key] = _draft4Dev1toDev2(value, loader, baseuri)
397403
elif isinstance(doc, list):
398404
for i, a in enumerate(doc):

jenkins.bash

100644100755
Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,45 @@
1-
#!/usr/bin/bash
1+
#!/bin/bash
2+
if [ "$JENKINS_URL" == ""]
3+
then
4+
echo "Looks like we're not being run by Jenkins, this is dangerous"
5+
echo "due to use of git clean -fdx command."
6+
exit 1
7+
fi
28
cloneorpull() {
3-
if test -d $1 ; then
4-
(cd $1 && git pull)
9+
if test -d "$1" ; then
10+
(cd "$1" && git pull)
511
else
6-
git clone $2
12+
git clone "$2"
713
fi
814
}
915
venv() {
10-
if ! test -d $1 ; then
11-
virtualenv $1
16+
if ! test -d "$1" ; then
17+
virtualenv "$1"
1218
fi
13-
. $1/bin/activate
19+
# shellcheck source=/dev/null
20+
source "$1"/bin/activate
1421
}
22+
git clean --force -d -x || /bin/true
1523
cloneorpull common-workflow-language https://github.com/common-workflow-language/common-workflow-language.git
1624
venv cwltool-venv
17-
(. cwltool-venv/bin/activate && PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pypi-cache/ pip install -U setuptools wheel pip)
18-
(. cwltool-venv/bin/activate && PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pypi-cache/ python setup.py install)
19-
(. cwltool-venv/bin/activate && PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pypi-cache/ pip install "cwltest>=1.0.20160825151655")
20-
# (. cwltool-venv/bin/activate && cd common-workflow-language && ./run_test.sh --junit-xml=result.xml RUNNER=cwltool DRAFT=draft-2)
21-
(. cwltool-venv/bin/activate && cd common-workflow-language && ./run_test.sh --junit-xml=result.xml RUNNER=cwltool DRAFT=draft-3)
22-
(. cwltool-venv/bin/activate && cd common-workflow-language && ./run_test.sh --junit-xml=result.xml RUNNER=cwltool)
23-
(. cwltool-venv/bin/activate && cd common-workflow-language && ./run_test.sh --junit-xml=result.xml RUNNER=cwltool DRAFT=v1.1.0-dev1 EXTRA=--enable-dev)
24-
(. cwltool-venv/bin/activate && ./build-cwl-docker.sh && docker push commonworkflowlanguage/cwltool_module && docker push commonworkflowlanguage/cwltool)
25+
docker pull node:slim
26+
export PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pypi-cache/
27+
pip install -U setuptools wheel pip
28+
python setup.py install
29+
pip install "cwltest>=1.0.20160825151655"
30+
pushd common-workflow-language
31+
git clean --force -d -x || /bin/true
32+
# shellcheck disable=SC2154
33+
if [[ "$version" = *dev* ]]
34+
then
35+
EXTRA="EXTRA=--enable-dev"
36+
fi
37+
./run_test.sh --junit-xml=result.xml RUNNER=cwltool -j4 DRAFT="${version}" ${EXTRA}
38+
CODE=$?
39+
popd
40+
if [ "$GIT_BRANCH" = "origin/master" ] && [[ "$version" = "v1.0" ]]
41+
then
42+
./build-cwl-docker.sh && docker push commonworkflowlanguage/cwltool_module && docker push commonworkflowlanguage/cwltool
43+
fi
44+
#docker rm -v $(docker ps -a -f status=exited | sed 's/ */ /g' | cut -d' ' -f1)
45+
exit ${CODE}

0 commit comments

Comments
 (0)