Running bat files in Jenkins

后端 未结 4 684
再見小時候
再見小時候 2021-01-02 03:09

I have a simple question. I want to run a bat file that should run post build. The bat file takes in to parameters previousVersion and currentVersion (These parameters are

相关标签:
4条回答
  • 2021-01-02 03:30

    Replace "cmd \k" with "call"

    The Execute Windows Batch command is running inside a cmd already; no need to specifically start a new one. Just "call" your BAT file.

    0 讨论(0)
  • 2021-01-02 03:34

    I tried to do like this, first point it to the path where your bat file exists, and then 'call' command to trigger that bat file. As below:

    cd yourFilePath
    

    and then

    call yourFile.bat
    
    0 讨论(0)
  • 2021-01-02 03:34

    Create file name jenkins.bat and place this file where your jenkins.war file is available.

    You have to click jenkins.bat file.

    Note :- After click on jenkins.bat file, chrome browser will automatically open with jenkins url.

    Try this If your system configured with Java 8 or 7 Installation.

    timeout 3
    start chrome http://localhost:8080
    timeout 3
    java -jar jenkins.war
    

    Try this If your system configured with Java 10 or above Installation.

    timeout 3
    start chrome http://localhost:8080
    timeout 3
    java -jar jenkins.war --enable-future-java
    
    0 讨论(0)
  • 2021-01-02 03:38

    if you want to start a separate Command window you can try:

    start cmd \k "your\bat"
    

    here is a reference: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

    0 讨论(0)
提交回复
热议问题