• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# shellcheck disable=SC1091  # the path is created in build-kdl and
3# here is check if exist
4
5terminate() {
6  echo "ci-kdl.sh caught SIGTERM signal! propagating to child processes"
7  for job in $(jobs -p)
8  do
9    kill -15 "$job"
10  done
11}
12
13trap terminate SIGTERM
14
15if [ -f /ci-kdl.venv/bin/activate ]; then
16  source /ci-kdl.venv/bin/activate
17  /ci-kdl.venv/bin/python /ci-kdl.venv/bin/ci-kdl | tee -a /results/kdl.log &
18  child=$!
19  wait $child
20  mv kdl_*.json /results/kdl.json
21else
22  echo -e "Not possible to activate ci-kdl virtual environment"
23fi
24
25