diff --git a/templates/license/license.gitlab-ci.yml b/templates/license/license.gitlab-ci.yml index 7ce5190..7ef0aa5 100644 --- a/templates/license/license.gitlab-ci.yml +++ b/templates/license/license.gitlab-ci.yml @@ -8,9 +8,15 @@ INVALID_LICENSE_ADOC_FILE: invalid-licenses.adoc NUMBER_OF_ALLOWED_FAILURES: 0 script: + # If bom-file does not exist, search for it in default-maven directory - > - if [ "$BACKEND_DIR" != "" ]; then - cd $BACKEND_DIR + if [[ ! -f "$BOM_FILE" && -f "$BACKEND_DIR/target/bom.json" ]]; then + export BOM_FILE=$BACKEND_DIR/target/bom.json + fi + # If bom-file does not exist, search for it in default-gradle directory + - > + if [[ ! -f "$BOM_FILE" && -f "$BACKEND_DIR/build/reports/bom.json" ]]; then + export BOM_FILE=$BACKEND_DIR/build/reports/bom.json fi - export NUMBER_OF_INVALID_LICENSES=0 - export INVALID_BOM_FILE=invalid-bom.json