Unverified Commit f3df4bbe authored by Volodymyr SAVCHENKO's avatar Volodymyr SAVCHENKO
Browse files

download cwl artifact

parent bcd18df9
......@@ -32,8 +32,19 @@ function upgrade-oda-python() {
PIP="python -m pip"
echo "selected pip: $PIP"
$PIP install --upgrade pyyaml --user || pip install --upgrade pyyaml \
|| { echo -e "\033[31missue updating python module of pyyaml from $DIR!\033[0m"; exit 1; }
# because pip is just too slow
if python -c '
import sys
import importlib as imp
if imp.util.find_spec("yaml") is None:
sys.exit(1)
'; then
echo -e '\033[32m valid ODA environment found\033[0m'
else
echo -e '\033[31m ODA environment incomplete! will bootstrap\033[0m'
$PIP install --upgrade pyyaml --user || pip install --upgrade pyyaml \
|| { echo -e "\033[31missue updating python module of pyyaml from $DIR!\033[0m"; exit 1; }
fi
if [ -s $DIR/setup.py ]; then
oda-cc version -c $DIR || {
......@@ -73,7 +84,7 @@ fi
PORT=8998
DOCKER_REGISTRY=volodymyrsavchenko
DOCKER_REGISTRY=faircrosscalibration
#DOCKER_REGISTRY=admin.reproducible.online
......@@ -419,9 +430,34 @@ function configure-reana() {
reana-client secrets-list
}
function download-cwl() {
set -e
echo -e "\033[33mwill download"
curl -L --header "PRIVATE-TOKEN: $(cat ~/.gitlab-token)" \
"https://gitlab.astro.unige.ch/api/v4/projects/integral%2Fcc-workflows%2Fcc-${SOURCE_NAME}/jobs/artifacts/master/download?job=build" > artifacts.gz
unzip -o artifacts.gz job.cwl
echo -e "\033[32mfound job.cwl"
set +e
}
function run-reana() {
inputs=${1:?}
download-cwl
echo "
version: 0.3.0
inputs:
parameters:
input: inputs.yaml
workflow:
type: cwl
file: crab.cwl
outputs:
files:
- cwl/docker_outdir/cwl.output.json
" > reana.yaml
cp -v $inputs inputs.yaml
name=$( oda-cc get metadata.source_short_name unnamed )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment