ホーム › フォーラム › A5:SQL Mk-2掲示板 › Use a5m2cmd in Jenkins
-
投稿者投稿
-
maria
ゲストI have a cmd file that will execute the SQL file I using the a5m2cmd.
Example content of the cmd file is :
“%A5M2CMD_PATH%” “/Connect=__ConnectionType=Internal;ProviderName=PostgreSQL;UserName=%USER_NAME%;Password=%PASSWORD%;ServerName=%SERVER_NAME%;Port=%PORT%;Database=%DATABASE%;ProtocolVersion=30” /RunSQL /Encoding=UTF-8 “/FileName=%OUT_FILENAME%”I would like to run the cmd file in Jenkins.
How can Jenkins know that the SQL file has error if ever?
Thank you.
松原正和
キーマスターHello maria
You should be able to see the error in the process return value.
The process return value is 0 if successful, 1 if there is an error.maria
ゲスト“%A5M2CMD_PATH%” “/Connect=__ConnectionType=Internal;ProviderName=PostgreSQL;UserName=%USER_NAME%;Password=%PASSWORD%;ServerName=%SERVER_NAME%;Port=%PORT%;Database=%DATABASE%;ProtocolVersion=30” /RunSQL /Encoding=UTF-8 “/FileName=%OUT_FILENAME%”
if %errorlevel% equ 0 (
set “NEWCART_RESULT= SUCCESS”
) else (
set “NEWCART_RESULT= FAILED”
)in my cmd file, can i use the %errorlevel% ?
松原正和
キーマスターHello maria
Wouldn’t the following work?
a5m2cmd.exe /RunSQL /FileName=RunSQL.sql /Connect=PostgreSQL:foo/bar@localhost:5432/baz
if not %errorlevel%==0 goto :error
…
-
投稿者投稿