Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
pipeline {
agent any
agent { label 'sonar'}
// Make sure this is correctly defined

stages {
stage('vcs') {
steps {
git branch: 'main',
url: 'https://github.com/dummyrepos/SampleWeb.git'
git branch: 'master',
url: 'https://github.com/sivaganesh2312/SampleWebnop.git'
}
}
stage('build and analysis') {
stage('SonarQube Analysis') {
steps {


withSonarQubeEnv(credentialsId: 'SONAR_CLOUD', installationName: 'sonarcloud') {
sh 'dotnet sonarscanner begin /k:"sivaganesh2312_SampleWebnop" /o:sivaganesh2312'
sh 'dotnet build SampleMVC.sln --no-incremental'
sh 'dotnet test SampleMVC.sln'
sh 'dotnet publish -c Release StudentsWeb/StudentsWeb.csproj -o published/'

sh 'dotnet sonarscanner end'
}
}

}
}
}
}

==================================================