Click here to Skip to main content
15,887,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a c# code which gets a file (say excel)from sharepoint. This is a stand alone code. I have to add this stand alone code to Jenkins build of an existing project, so that the code gets executed in compile time.. How can I achieve this? Jenkins is very new to me.

What I have tried:

I'm new to Jenkins. Actually I did it as a method and executed it in run time. But I need it as a compile time execution. So only way is to try in Jenkins build file.
Posted
Updated 22-Oct-18 8:09am

1 solution

In Jenkins there are jobs, you can add that code as a job, that runs before the MSBuild—or whatever build system you are using—step of your Jenkins CI pipeline. This way, the code will run before the job, or after it. The process of adding a job is easy, you just use the GUI of the Jenkins and add a new job, pass the path for the executable, or use the Bash/Batch command-line interface to execute the code manually.

Running the code concurrently in Jenkins is an advanced topic and requires the conceptual understanding of Jenkins and nodes.

Distributed builds - Jenkins - Jenkins Wiki[^]
Pipeline: Nodes and Processes[^]

Check the following links,
Jenkins Setup Build Jobs[^]
Building a software project - Jenkins - Jenkins Wiki[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900