A5:SQL Mk-2

開発のこと、日々のこと

Use a5m2cmd in Jenkins

ホーム フォーラム A5:SQL Mk-2掲示板 Use a5m2cmd in Jenkins

4件の投稿を表示中 - 1 - 4件目 (全4件中)
  • 投稿者
    投稿
  • #20534 返信
    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.

    #20544 返信
    松原正和
    キーマスター

    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.

    #20548 返信
    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% ?

    #20573 返信
    松原正和
    キーマスター

    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

4件の投稿を表示中 - 1 - 4件目 (全4件中)
返信先: Use a5m2cmd in Jenkins
あなたの情報:




コメントは受け付けていません。