Skip to content

dotnet ci cd pipelines for github, azure devops, gitlab, bitbucket, and etc.

License

Notifications You must be signed in to change notification settings

lastlink/dotnet-ci-pipelines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOTNET CORE CI PIPELINE EXAMPLE:

Goal to have dotnet core c# example pipelines for major git source control dev ops including github, azure devops, gitlab, bitbucket, and etc. Should auto run only on a new pull request, show test results in native ui per website, code coverage, and some additional manual steps running code quality analysis. Badge support native is also nice or from https://shields.io/category/build. Also will try service containers and database unit tests. Originally off of gitlab-ci-example-dotnetcore.

Contribution

  • Please do a pull request to the proper source control pipeline that you are trying to update.

TOC

  • limits 2,000 (per month) to 20 concurrent jobs support windows, ubuntu, mac
    • doesn't currently support retry and max timeout although will cancel when limit reached.
  • Badges - workflow
  • api docs - docfx html only
  • [!] Tests - no display just logs and work flow
  • CodeClimate issues with non npm and docker in docker
  • resharper cli - no manual triggers supports
  • security dependency scan - snyk
  • artifacts
  • Services mysql, postgres, and mssql work like a charm
  • [] release
    • [] obfuscators
  • limits 50 minutes per month, support docker images
  • Badges
  • api docs - docfx html only
  • Tests - working display
    • junit works fine
    • print out code coverage in log, not natively supported
  • [!] CodeClimate - docker in docker throwing an error
    • docker: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories.
  • resharper cli
  • artifacts only last 12 hrs are downloaded in the .tar.gz format, could not figure out the curl method
  • Services mysql and postgres work
    • mssql starts up, gives lots of details on docker image running, not enough detail for why test was failing
  • limits 1,800 minutes per month on private projects. $40 a month for unlimited minutes.
  • Badges?
    • build
  • api docs - docfx html only (pdf works locally, maybe self hosted runner)
  • Tests - working display
  • CodeClimate 3m
  • resharper cli
  • artifacts
  • Service Containers mysql and postgress work fine
    • mssql fails to connect after container should be initialized successfully. (only initializes for linux agents)
    • really want mssql to work for ease w/ some integrated testing and pre deploy checks. tracking progress in stackoverflow and developercommunity.visualstudio.com

[ ] Gitlab pipeline status coverage status Quality Gate Status Code Smells Technical Debt Coverage Lines of Code

  • limits 400 2,000 minutes per month per group or user. $10 to buy 1,000 extra minutes expires end of year.
  • Badges
    • pipeline
    • coverage
      • build in
      • coverlet
        • [] badge_branchcoverage badge_branchcoverage
        • [] badge_combined badge_branchcoverage
        • [] badge_linecoverage badge_branchcoverage
    • build per job?
  • api docs - docfx
  • Tests - Junit
  • Coverage - coverlet
  • Services - mysql, postgres, mssql all work
    • mssql occasionally fails to connect and step just needs to be rerun.
  • Code Quality
    • resharper clis
      • inspectcode 1min
      • dupfinder 1min
    • CodeClimate (complexity & duplication) 10min+
  • artifacts
  • pricing free up to 5 users. Cloud Build limits first 120 minutes a day free. $30 per 1000 priced per minute.
  • used solely for pushing docker builds to a registry and deploying. While in theory you could run unit tests in a docker image it is recommended to use an alternative for unit tests

Other

Database

  • dotnet ef migrations add InitialMigrations --project ../MyProject.Repository/MyProject.Repository.csproj --startup-project ./MyProject.Api.csproj
  • dotnet ef migrations remove
  • dotnet ef database update --project ../MyProject.Repository/MyProject.Repository.csproj --startup-project ./MyProject.Api.csproj