Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 23, 2021. It is now read-only.
Merged
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
8 changes: 5 additions & 3 deletions 8 Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
NAMESPACE = 'library'
GITLAB_ACCOUNT = 'admin1'
APP_NAME = 'devops-sample-s2i'
SONAR_TOKEN_ID= 'sonar-token'
SONAR_CREDENTIAL_ID= 'sonar-token'
}

stages {
Expand All @@ -38,8 +38,10 @@ pipeline {
stage('sonarqube analysis') {
steps {
container ('maven') {
withSonarQubeEnv('sonar') {
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID"
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
withSonarQubeEnv('sonar') {
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
}
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
Expand Down
8 changes: 5 additions & 3 deletions 8 Jenkinsfile-online
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
NAMESPACE = 'docker_username'
GITHUB_ACCOUNT = 'kubesphere'
APP_NAME = 'devops-sample-s2i'
SONAR_TOKEN_ID= 'sonar-token'
SONAR_CREDENTIAL_ID= 'sonar-token'
}

stages {
Expand All @@ -38,8 +38,10 @@ pipeline {
stage('sonarqube analysis') {
steps {
container ('maven') {
withSonarQubeEnv('sonar') {
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN_ID"
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
withSonarQubeEnv('sonar') {
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
}
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public class HelloWorldController {
public String sayHello() {
return "Hello,World!";
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.