Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create sonar-project.properties #3

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This adds a quality gate that aborts the pipeline if the quality threshold isn't met
pipeline {
agent any

stages {
stage('Checkout') {
steps {
// Get some code from a GitHub repository
git branch: 'main', url: 'https://github.com/huskyrat/lbg-vat-calculator.git'
}
}
stage('SonarQube Analysis') {
environment {
scannerHome = tool 'sonarqube'
}
steps {
withSonarQubeEnv('sonar-qube-1') {
sh "${scannerHome}/bin/sonar-scanner"
}
timeout(time: 10, unit: 'MINUTES'){
waitForQualityGate abortPipeline: true
}
}
}
}
}
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.projectKey=SQ-Jenkins-Test
4 changes: 2 additions & 2 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
}

.colour-border{
border: 3px solid green;
border: 3px solid cyan;
padding: 10px;
}

.header{
padding: 10px;
padding: 30px;
}