Commit c1faa8cd authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Allowing YANG Strict to fail + no exposure of logs if empty as artifacts

parent 09244db2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -34,15 +34,15 @@ YANG Strict:
  script:
    - echo 'YANG Strict'
    - ./validate-data-models.sh .   
  after_script:
    - ls
  artifacts:
    name: "YANG strict validation result"
    when: always
    paths:
      - ${LOGFILE_YANG}

YANG 3GPP Checks:
  stage: validation
  allow_failure: true
  before_script:
    - |
     curl "${CI_API_V4_URL}/projects/57/repository/files/sa5%2Flint-data-models%2Esh/raw?ref=master" >> lint-data-models.sh
@@ -52,6 +52,7 @@ YANG 3GPP Checks:
    - ./lint-data-models.sh .
  artifacts:
    name: "YANG 3gpp style check result"
    when: always
    paths:
      - ${LOGFILE_LINT}
    
@@ -66,6 +67,7 @@ Validate OpenAPI:
    - ./validate-all.sh ./OpenAPI
  artifacts:
    name: "OpenAPI validation result"
    when: always
    paths:
      - ./OpenAPI/${LOGFILE_OPENAPI}
    
+6 −2
Original line number Diff line number Diff line
@@ -76,6 +76,10 @@ if [ $ret == 1 ] ; then
	echo "To see the full output of the linter, download the archived artifact named '$LOGFILE'."
fi

# exit $ret
exit 0
if [ ! -s $LOGFILE ] ;then
	rm "$LOGFILE"
fi

exit $ret
#exit 0
+4 −0
Original line number Diff line number Diff line
@@ -80,6 +80,10 @@ echo -e $LOG | tee -a $LOGFILE
echo -e "\n------ Content of the folder ------" | tee -a $LOGFILE
ls | tee -a $LOGFILE

if [ ! -s $LOGFILE ] ;then
	rm "$LOGFILE"
fi

# Exit code needed for jenkins to know the verdict of the build

exit $fres
+4 −0
Original line number Diff line number Diff line
@@ -37,5 +37,9 @@ if [ $ret == 0 ] ; then
    echo "No errors found by pyang --strict validation."
fi

if [ ! -s $LOGFILE ] ;then
	rm "$LOGFILE"
fi

exit $ret