GithubHelp home page GithubHelp logo

dotnet-test's Introduction

.NET Project Jenkins Pipeline

Required Jenkins plugins

  • Docker Pipeline (Version572.v950f58993843 is tested)

Instructions

  1. Download Jenkins war file and start Jenkins server
    ./run_jenkins.sh
    ./run_jenkins.sh
    
  2. Open Jenkins in browser
  3. Install the required plugins
  4. Create a new Pipeline job
  5. Copy the content of Jenkinsfile to the Pipeline script
  6. Save the job
  7. Run the job
  8. Check the test results in the job page

Conlusion

The error System.UnauthorizedAccessException: Access to the path '/.dotnet' is denied. was the most challenging part, I solved it by using root user in the docker container.

The task requirement states that if the tests executed successfully without failures, then the solution should be published. I think it is better to publish the artifact even if the test fails, so that the artifact can be used for further investigation. This can be achieved by adding a post stage to publish the artifact, or adding catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {} wrapper to the test stages. In case that one test stage failure causes that the Publish stage is skipped.

There is also another jenkins plugin MSTest available to convert MSTest TRX test reports into JUnit XML reports so it can be integrated with Jenkin's JUnit features. But seems it is not required for this task, so it is not used.

I have learned how to run stages in parallel and dotnet build, test and publish commands.

Roughly, 2 - 3 hours was spent on this task to explore the .net docker container, and write, test, refine the pipeline.

dotnet-test's People

Contributors

likair avatar

Watchers

 avatar

dotnet-test's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.