Unverified Commit 0d310c1f authored by Volodymyr SAVCHENKO's avatar Volodymyr SAVCHENKO
Browse files

reana clean

parent 79dc43b9
......@@ -21,7 +21,7 @@ test:
pull:
bash $(current_dir)/make-functions.sh $@
build: pull
build:
bash $(current_dir)/make-functions.sh $@
push: build
......
......@@ -30,6 +30,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo -e "\033[32mfound ci-template-cc location in $DIR\033[0m"
function upgrade-oda-python() {
echo "will update osa python"
PIP="python -m pip"
echo "selected pip: $PIP"
......@@ -109,9 +110,21 @@ function pull() {
}
function build() {
touch pip.conf
[ -s pip.conf ] || touch pip.conf
export DOCKER_BUILDKIT=1
docker pull $IMAGE || ( nb2worker ./ --build --tag-image $IMAGE --job --from ${CC_BASE_IMAGE:?} --docker-run-prefix="mkdir -pv /home/oda; export HOME_OVERRRIDE=/home/oda; source /init.sh; " --docker-command='id; export HOME_OVERRRIDE=/tmp; mkdir -pv $HOME_OVERRRIDE; source /init.sh; source /etc/bashrc; oda-kb-eval /repo/'$ROOT_NB' $@'; ls -ltr *cwl; )
set -x
#docker pull $IMAGE &&
(
nb2worker ./ --build \
--tag-image $IMAGE \
--job \
--from ${CC_BASE_IMAGE:?} \
--store-dockerfile /tmp/Dockerfile-auto \
--docker-run-prefix="mkdir -pv /home/oda; export HOME_OVERRRIDE=/home/oda; source /init.sh; " \
--docker-command='id; export HOME_OVERRRIDE=/tmp; mkdir -pv $HOME_OVERRRIDE; source /init.sh; source /etc/bashrc; oda-kb-eval /repo/'$ROOT_NB' $@'
ls -ltr *cwl
)
set +x
touch job.cwl
}
......@@ -370,7 +383,7 @@ function submit-all-scw() {
icversion=${1:?}
nscwmax=${2:-5000}
oda-node version -v || {
oda-node version || { # -v!!!
echo -e "\033[31mfailed to connect to ODAHUB\033[0m"
exit 1
}
......@@ -476,6 +489,24 @@ outputs:
reana-client start --workflow $name
}
function update-fixed-ci-version() {
sed -i 's@raw/.*/@raw/'$(cd ci-template-cc/; git describe --always)'/@g' .gitlab-ci.yml
}
function reana-clear-all() {
# $ kubectl exec -i -t deployment/reana-db -- psql -U reana
# psql> SET search_path to __reana, public;
# psql> UPDATE workflow SET status='stopped' WHERE name='myanalysis' AND status='running';
# psql> \q
# If you need just some run numbers, you can add ... AND run_number=... to the SQL query.
# After flipping the regular reana-client delete command will work:
# $ reana-client delete -w myanalysis --include-all-runs --include-workspace --include-records
}
$@
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