some updates to test w/ burnettk
This commit is contained in:
parent
738cee1fb0
commit
9a62ee04aa
|
@ -220,7 +220,6 @@ jobs:
|
|||
timeout-minutes: 20
|
||||
env:
|
||||
SPIFFWORKFLOW_BACKEND_RUN_DATA_SETUP: "false"
|
||||
SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA: "true"
|
||||
- name: wait_for_backend
|
||||
run: ./bin/wait_for_server_to_be_up 5
|
||||
|
||||
|
|
|
@ -7,10 +7,8 @@ function error_handler() {
|
|||
trap 'error_handler ${LINENO} $?' ERR
|
||||
set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
export BPMN_SPEC_ABSOLUTE_DIR="$script_dir/../../../sample-process-models"
|
||||
fi
|
||||
BPMN_SPEC_ABSOLUTE_DIR=$(./bin/find_sample_process_models)
|
||||
export BPMN_SPEC_ABSOLUTE_DIR
|
||||
|
||||
if [[ -z "${SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE:-}" ]]; then
|
||||
export SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE=run
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function error_handler() {
|
||||
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||
exit "$2"
|
||||
}
|
||||
trap 'error_handler ${LINENO} $?' ERR
|
||||
set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
>&2 echo "ERROR: Could not find a location for the sample processes. Last tried: $BPMN_SPEC_ABSOLUTE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
export BPMN_SPEC_ABSOLUTE_DIR
|
||||
pushd "$BPMN_SPEC_ABSOLUTE_DIR"
|
||||
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]]; then
|
||||
>&2 echo "ERROR: please do not use the main branch of sample-process-models. use dev"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
|
||||
echo "$BPMN_SPEC_ABSOLUTE_DIR"
|
|
@ -17,25 +17,9 @@ if [[ -z "${SPIFFWORKFLOW_BACKEND_ENV:-}" ]]; then
|
|||
export SPIFFWORKFLOW_BACKEND_ENV=development
|
||||
fi
|
||||
|
||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
>&2 echo "ERROR: Could not find a location for the sample processes. Last tried: $BPMN_SPEC_ABSOLUTE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
export BPMN_SPEC_ABSOLUTE_DIR
|
||||
pushd "$BPMN_SPEC_ABSOLUTE_DIR"
|
||||
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]]; then
|
||||
>&2 echo "ERROR: please do not use the main branch of sample-process-models. use dev"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
BPMN_SPEC_ABSOLUTE_DIR=$(./bin/find_sample_process_models)
|
||||
export BPMN_SPEC_ABSOLUTE_DIR
|
||||
echo "$BPMN_SPEC_ABSOLUTE_DIR"
|
||||
|
||||
export FLASK_SESSION_SECRET_KEY=super_secret_key
|
||||
export APPLICATION_ROOT="/"
|
||||
|
@ -46,6 +30,7 @@ else
|
|||
export FLASK_DEBUG=1
|
||||
|
||||
if [[ "${SPIFFWORKFLOW_BACKEND_RUN_DATA_SETUP:-}" != "false" ]]; then
|
||||
echo "RUNING STUFF"
|
||||
SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
||||
fi
|
||||
FLASK_APP=src/spiffworkflow_backend poetry run flask run -p 7000
|
||||
|
|
|
@ -9,6 +9,7 @@ def main() -> None:
|
|||
"""Main."""
|
||||
app = create_app()
|
||||
with app.app_context():
|
||||
print("HEY")
|
||||
failing_process_models = DataSetupService.save_all_process_models()
|
||||
for bpmn_errors in failing_process_models:
|
||||
print(bpmn_errors)
|
||||
|
|
|
@ -50,8 +50,8 @@ class DataSetupService:
|
|||
)
|
||||
)
|
||||
|
||||
current_app.logger.debug(
|
||||
"DataSetupService.save_all_process_models() end"
|
||||
)
|
||||
current_app.logger.debug(
|
||||
"DataSetupService.save_all_process_models() end"
|
||||
)
|
||||
db.session.commit()
|
||||
return failing_process_models
|
||||
|
|
Loading…
Reference in New Issue