简体   繁体   中英

Jenkins access msbuild file in github probject

My current situtation

I learning how to write Unit Tests with NUnit 3.4. The whole time I had like 3 Steps.

1.) I write my C#-Project with unit tests

2.) In the same folder where my Solution is, I have a msbuild-file which build my project and creates stuff like:

  • Console-Report.xml
  • MyProject.dll
  • MyProject.pdb
  • MyProject_Test.dll
  • MyProject_Test.pdb
  • nunit.framework.dll
  • nunit.framewirk.xml

3.) I use Jenkins (nunit- und msbuildPlugins are installed): Every time I press "Build now" it calls my msbuild-file in the project folder:

在此输入图像描述

So far, so good.

What I want

Now I want Jenkins to build every time I change and update my code and I read that there are many ways to do that. I want to try it with Github.

1.) I created a new repository "CannonAttack" and imported my project "MyCannonAttack"

2.) I connected more or less Github with Jenkins via this article successfully. See here: 在此输入图像描述

But now I need to run my msbuild-file, which is on github. How can I call/access it? This is my github-project . In the next folder you can finde the msbuild-file.

Set your MSBuild Build File value to: ${WORKSPACE}\\CannonAttack\\MyCannonAttack\\TestK.msbuild

Or possibly ${WORKSPACE}\\MyCannonAttack\\TestK.msbuild You can click on "Workspace" on the left of the job page to see exactly where it is... In case I'm off by one folder in my suggestion. But ${WORKSPACE} is an environment variable that allows you to access the paths that you pull to with source control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM