🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Gitlab Tutorials: CI for automation and .Net Framework Sonarqube Codecoverage


variables:
  SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
  GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task

stages:
  - build
  - test
  - analyze

before_script:
 - Set-Variable -Name "time" -Value (Get-Date -Format "%H:%m")
 - echo ${time}
 - echo "started by ${GITLAB_USER_NAME}"



build:
  stage: build
  only:
    - branches
  script:
    - echo "running scripts in the build job"
    - choco feature enable -n=allowGlobalConfirmation
    - choco install netfx-4.6.2-devpack
    - choco install dotnetcore-sdk
    - nuget restore -ConfigFile .\nuget.config 
    - msbuild ".\ProcessFlowModuleDotNetV1\ProcessFlowModule.csproj" /p:DeployOnBuild=true /p:PublishProfile="Local Publish" /p:WarningLevel=0
    - dotnet build ".\ProcessFlowModuleDotNetV1.Tests\ProcessFlowModule.Tests.csproj" --configuration Release
  artifacts:
    paths:
      - Publish
      - .\ProcessFlowModule.Tests\bin\Release\netcoreapp3.1\**
      - .\ProcessFlowModule
    expire_in: 1 day
  after_script:
    - Remove-Item -Recurse -Force .\packages\


sonarcloud-check:
  image:
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: [""]
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  dependencies:
    - build
  script:    
    - SonarScanner.MSBuild.exe begin /k:"project_key" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="jjhyd8b6500d75a8af6f7c3a3726a2b8782a39a439a7"   
    - nuget restore -ConfigFile .\nuget.config
    - MsBuild.exe ./ProcessFlowModule /t:Rebuild
    - SonarScanner.MSBuild.exe end /d:sonar.login="jjhyd8b6500d75a8af6f7c3a3726a2b8782a39a439a7"
  only:
    - branches

Here I try with default script:
    sonarcloud-check:
  stage: test
  image:
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: [""]
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  script:
    - sonar-scanner

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x