Creating a CI pipeline for .net containerized applications

My Goal

As the title says, I am trying to put together a CI (Continuous Integration) pipeline for a raft of .NET services which are going to be run in a dockerized environment in Linux. The developers at my organisation use C#, and VSO/TFS currently, so we are attempting to migrate to a Linux platform while retaining the tooling/skill-set of our current team.

  • Java Maven Project Docker Integration Tests
  • Deploy docker container from external registry to Heroku
  • Run maven command from docker image
  • Robot Framework and CI, run in container or not
  • Is there an easy way to change to a non-root user in Bitbucket Pipelines Docker container?
  • Concourse CI will not run Hello-World after setting up with the official docker image. It fails showing “no workers”
  • I have seen a lot of posts on various forums, but have been unable to find anything that addresses my specific need – so if this has been answered before – I would very much appreciate a link!

    So far, I have done the following to try to prove what I can do:

    1. Created a C# project with a unit test.
    2. Checked the project into source control (TFS online)
    3. Running Jenkins on a linux box
    4. Set up Jenkins to listen for pushes into source control.
    5. When new code detected, a build is kicked off on a Jenkins node (which is a Windows machine) using MSBuild plug-in
    6. If build completes without errors, use MSTest plug-in to run all the unit tests associated to the C# project.

    All the above seems to work just fine – it’s the next bit that I am struggling with.

    What I want to do
    Now that I have a build completed and tested in code, I want to be able to do the following (at a high level):

    1. Move source code from the Jenkins windows node to a Jenkins Linux node
    2. Build a docker container on the Linux node
    3. Push the docker container into a repository

    What I have tried
    I am using a freestyle project in Jenkins to orchestrate the above. (Not sure if this is the right choice – but seems to do the pull/build/test without breaking a sweat.)

    I figured that in order to get the code from the Windows node to the Linux node, I would need to push into a GIT repository. My requirement is that this is a local GIT, but if that is not possible, I am open to using a private GIT online.

    I tried setting up a local Gogs-GIT repository, but Jenkins doesn’t speak the same language as it. In any case – I haven’t been able to figure out how to use any of the Jenkins plug-ins to push code as a post build event from my Windows node into a different source control environment than where it came from in the first place.

    I am now thinking that maybe I need to execute some sort of custom script (maybe a batch script on the Windows node) to do a push into GIT and then have a separate Jenkins job that listens for pushes to the GIT repository to start the Linux process.

    I am pretty new to both Linux and Jenkins, so any help or pointers would be much appreciated.

  • Build the Node js app on Docker
  • How to override the CMD command in the docker run line
  • Unable to get Maven version from /usr/share/maven/bin/mvn Could not find system variable
  • How to include dependencies in .NET Core app docker image?
  • Docker Mysql container root password [mysqld listens port 0]
  • access service from host when ports and not linked
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.