Do not blow up when another puppet process is already running during deploy.
[arvados-dev.git] / jenkins / run-build-packages.sh
index b78cf7f4752fd64891ee4f71effd9952d75afa58..99d06816b1a89aeade63527df6b5e45996e5d8f6 100755 (executable)
@@ -397,10 +397,40 @@ build_and_scp_deb $WORKSPACE/services/nodemanager arvados-node-manager 'Curovers
 # A few dependencies
 for deppkg in python-gflags pyvcf google-api-python-client oauth2client \
       pyasn1 pyasn1-modules rsa uritemplate httplib2 ws4py virtualenv \
-      pykka apache-libcloud requests six; do
+      pykka apache-libcloud requests six pyexecjs jsonschema; do
     build_and_scp_deb "$deppkg"
 done
 
+# cwltool from common-workflow-language. We use this in arv-run-pipeline-instance.
+# We use $WORKSPACE/common-workflow-language as the clean directory from which to build the cwltool package
+if [[ ! -d "$WORKSPACE/common-workflow-language" ]]; then
+  mkdir "$WORKSPACE/common-workflow-language"
+  cd "$WORKSPACE"
+  if [[ "$DEBUG" != 0 ]]; then
+    git clone https://github.com/rabix/common-workflow-language.git common-workflow-language
+  else
+    git clone -q https://github.com/rabix/common-workflow-language.git common-workflow-language
+  fi
+fi
+
+cd "$WORKSPACE/common-workflow-language"
+if [[ "$DEBUG" != 0 ]]; then
+  git checkout master
+  git pull
+else
+  git checkout -q master
+  git pull -q
+fi
+
+cd reference
+handle_python_package
+CWLTOOL_VERSION=`git log --first-parent --max-count=1 --format='format:0.1.%ct.%h'`
+
+# Build cwltool package
+cd $WORKSPACE/debs
+
+build_and_scp_deb $WORKSPACE/common-workflow-language/reference cwltool 'Common Workflow Language Working Group' 'python' "$(awk '($1 == "Version:"){print $2}' $WORKSPACE/common-workflow-language/reference/cwltool.egg-info/PKG-INFO)"
+
 # Finally, publish the packages, if necessary
 if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
   ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"