Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
devops-java-sample
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
devops
devops-java-sample
Commits
7c3fd2d7
Commit
7c3fd2d7
authored
Apr 04, 2019
by
soulseen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cmd sonar
parent
9a3c04c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
Jenkinsfile
Jenkinsfile
+8
-6
Jenkinsfile-online
Jenkinsfile-online
+9
-7
No files found.
Jenkinsfile
View file @
7c3fd2d7
...
...
@@ -36,9 +36,10 @@ pipeline {
stage
(
'sonarqube analysis'
)
{
steps
{
container
(
'maven'
)
{
withCredentials
([
string
(
credentialsId:
'sonar-token'
,
variable:
'SONAR_TOKEN'
)])
{
withSonarQubeEnv
(
'sonar'
)
{
sh
"mvn
-o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN"
sh
"mvn sonar:sonar
-o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN"
}
}
timeout
(
time:
1
,
unit:
'HOURS'
)
{
...
...
@@ -46,6 +47,7 @@ pipeline {
}
}
}
}
stage
(
'build & push'
)
{
steps
{
...
...
Jenkinsfile-online
View file @
7c3fd2d7
...
...
@@ -36,9 +36,10 @@ pipeline {
stage('sonarqube analysis') {
steps {
container ('maven') {
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
withSonarQubeEnv('sonar') {
sh "mvn
-gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN"
sh "mvn sonar:sonar -o
-gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN"
}
}
timeout(time: 1, unit: 'HOURS') {
...
...
@@ -46,6 +47,7 @@ pipeline {
}
}
}
}
stage ('build & push') {
steps {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment