how to run an exe file within a declarative pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to run an exe file within a declarative pipeline

Jesus Fernandez-2
I am trying to create a pipeline which execute the application with some test scripts once it is built. If done through the CMD it opens the application run a test(AIImprovementsBucket1Test) and exit the application.  I have tried this: 
```
        stage('test') {
            steps{
                script{
                    bat """
                        START  ""  "D:/project/Game/project.exe" SCRIPT=AIImprovementsBucket1Test SCRIPTREPORT=project_Test_Run_Testing.txt
                    """
                } 
            }
        }
```
but then the pipeline just finishes as SUCCESS but it does not open the program. I have tried to take the command and put it inside a .bat file then invoke that file from the pipeline like this:
```
        stage('test') {
            steps{
                 bat ('call "C:/Users/User/Desktop/TestHarnessStuff/testHarness.bat"');
            }
        }
```
but I get the same result, pipeline finishes as success with it does not open the application. I have been going through some SO threads on how to run a .exe file but I just found windows exe runner plugin which cannot be used in declarative pipeline as far as I know. Is there any other way or workaround to do this?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8de030bc-ea81-42eb-b488-ce91d96875d1n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: how to run an exe file within a declarative pipeline

slide
Is the application a console app or Windows app? What if you add /wait to the START command?

On Wed, Jan 13, 2021, 05:50 [hidden email] <[hidden email]> wrote:
I am trying to create a pipeline which execute the application with some test scripts once it is built. If done through the CMD it opens the application run a test(AIImprovementsBucket1Test) and exit the application.  I have tried this: 
```
        stage('test') {
            steps{
                script{
                    bat """
                        START  ""  "D:/project/Game/project.exe" SCRIPT=AIImprovementsBucket1Test SCRIPTREPORT=project_Test_Run_Testing.txt
                    """
                } 
            }
        }
```
but then the pipeline just finishes as SUCCESS but it does not open the program. I have tried to take the command and put it inside a .bat file then invoke that file from the pipeline like this:
```
        stage('test') {
            steps{
                 bat ('call "C:/Users/User/Desktop/TestHarnessStuff/testHarness.bat"');
            }
        }
```
but I get the same result, pipeline finishes as success with it does not open the application. I have been going through some SO threads on how to run a .exe file but I just found windows exe runner plugin which cannot be used in declarative pipeline as far as I know. Is there any other way or workaround to do this?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8de030bc-ea81-42eb-b488-ce91d96875d1n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfsu5U3r3HmoJUJJ%2B4%3DNzbY%2Bd-muB%2BxEU%2BVxOH7asT0oQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: how to run an exe file within a declarative pipeline

Jesus Fernandez-2
it is a windows app (a videogame) adding /wait how so? sorry but I am not good at batch commands, I am learning

On Wednesday, January 13, 2021 at 2:26:51 PM UTC+1 slide wrote:
Is the application a console app or Windows app? What if you add /wait to the START command?

On Wed, Jan 13, 2021, 05:50 [hidden email] <[hidden email]> wrote:
I am trying to create a pipeline which execute the application with some test scripts once it is built. If done through the CMD it opens the application run a test(AIImprovementsBucket1Test) and exit the application.  I have tried this: 
```
        stage('test') {
            steps{
                script{
                    bat """
                        START  ""  "D:/project/Game/project.exe" SCRIPT=AIImprovementsBucket1Test SCRIPTREPORT=project_Test_Run_Testing.txt
                    """
                } 
            }
        }
```
but then the pipeline just finishes as SUCCESS but it does not open the program. I have tried to take the command and put it inside a .bat file then invoke that file from the pipeline like this:
```
        stage('test') {
            steps{
                 bat ('call "C:/Users/User/Desktop/TestHarnessStuff/testHarness.bat"');
            }
        }
```
but I get the same result, pipeline finishes as success with it does not open the application. I have been going through some SO threads on how to run a .exe file but I just found windows exe runner plugin which cannot be used in declarative pipeline as far as I know. Is there any other way or workaround to do this?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8de030bc-ea81-42eb-b488-ce91d96875d1n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fb1ecca1-2216-47b2-a291-8e1ea9e323f3n%40googlegroups.com.