Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Carlo FERRIGNO
ci-template-cc
Commits
f3df4bbe
Unverified
Commit
f3df4bbe
authored
Jan 28, 2021
by
Volodymyr SAVCHENKO
Browse files
download cwl artifact
parent
bcd18df9
Changes
1
Hide whitespace changes
Inline
Side-by-side
make-functions.sh
View file @
f3df4bbe
...
...
@@ -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
"
\0
33[31missue updating python module of pyyaml from
$DIR
!
\0
33[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
"
\0
33[31missue updating python module of pyyaml from
$DIR
!
\0
33[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
"
\0
33[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
"
\0
33[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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment