开发者

Integrating CSE validator in hudson CI

开发者 https://www.devze.com 2023-02-20 23:57 出处:网络
I have to integrate cse validator in hudson for html validation of the pages. Here we will have each html project folder under a root folder and by specifying the folder location hudson builds the fil

I have to integrate cse validator in hudson for html validation of the pages. Here we will have each html project folder under a root folder and by specifying the folder location hudson builds the files, but I need to integrate cse validator along with each build. This can be done with batch wizard in hudson. I have created one and executed, validations are working fine and im getting the results in mentioned output file, but its not returning actual error code even if there is error in the validated html files,

开发者_如何转开发

following is my code for validation,

@echo on
setlocal enableextensions enabledelayedexpansion

PUSHD "F:\Solutions\GND\Documents\Design\html\ValTest"
For %%X in (*.html) do 
(
    "C:\Program Files\HTMLValidator100\cmdlineprocessor"  -outputfile output.txt   -r1 %%X

    SET HTML_VAL_ERROR=!ERRORLEVEL!
    echo !HTML_VAL_ERROR!

    type output.txt >> result.txt
    IF !HTML_VAL_ERROR! GEQ 1 
    (
        SET HTML_VAL_ERROR = 1 
        GOTO :EOF
    )
)

POPD
EndLocal
:EOF

 EXIT !HTML_VAL_ERROR!


Instead of

EXIT !HTML_VAL_ERROR!

try:

EXIT /B !HTML_VAL_ERROR!
0

精彩评论

暂无评论...
验证码 换一张
取 消