Skip to content

Commit 5397e8f

Browse files
committed
add sonarqube
1 parent 848d253 commit 5397e8f

49 files changed

Lines changed: 2465 additions & 51 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Jenkinsfile‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ pipeline {
3434
}
3535
}
3636

37+
stage('sonarqube analysis') {
38+
steps {
39+
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
40+
withSonarQubeEnv('sonar') {
41+
sh "mvn -Dsonar.branch=$BRANCH_NAME -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN"
42+
}
43+
}
44+
timeout(time: 1, unit: 'HOURS') {
45+
waitForQualityGate abortPipeline: true
46+
}
47+
}
48+
3749
stage ('build & push') {
3850
steps {
3951
container ('maven') {

‎Jenkinsfile-online‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pipeline {
1313
HARBOR_CREDENTIAL_ID = 'harbor-id'
1414
GITLAB_CREDENTIAL_ID = 'gitlab-id'
1515
KUBECONFIG_CREDENTIAL_ID = 'demo-kubeconfig'
16-
REDISTRY = 'harbor.devops.kubesphere.local:30280'
17-
NAMESPACE = 'library'
16+
REDISTRY = 'docker.io'
17+
NAMESPACE = 'docker_username'
1818
GITLAB_ACCOUNT = 'admin1'
1919
APP_NAME = 'devops-sample-s2i'
2020
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
2-
#Wed Mar 27 14:14:40 CST 2019
2+
#Thu Apr 04 10:32:45 CST 2019
33
plexus-utils-3.0.22.jar>repo.jenkins-ci.org=
4+
plexus-utils-3.0.22.pom>repo.jenkins-ci.org=
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Copyright The Codehaus Foundation.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
19+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
<modelVersion>4.0.0</modelVersion>
21+
22+
<parent>
23+
<groupId>org.codehaus.plexus</groupId>
24+
<artifactId>plexus</artifactId>
25+
<version>3.3.1</version>
26+
</parent>
27+
28+
<artifactId>plexus-utils</artifactId>
29+
<version>3.0.22</version>
30+
31+
<name>Plexus Common Utilities</name>
32+
<description>A collection of various utility classes to ease working with strings, files, command lines, XML and
33+
more.
34+
</description>
35+
<url>http://plexus.codehaus.org/plexus-utils</url>
36+
37+
<scm>
38+
<connection>scm:git:git@github.com:codehaus-plexus/plexus-utils.git</connection>
39+
<developerConnection>scm:git:git@github.com:codehaus-plexus/plexus-utils.git</developerConnection>
40+
<url>http://github.com/codehaus-plexus/plexus-utils</url>
41+
<tag>plexus-utils-3.0.22</tag>
42+
</scm>
43+
<issueManagement>
44+
<system>JIRA</system>
45+
<url>http://jira.codehaus.org/browse/PLXUTILS</url>
46+
</issueManagement>
47+
48+
<dependencies>
49+
<dependency>
50+
<groupId>org.apache.maven.shared</groupId>
51+
<artifactId>maven-plugin-testing-harness</artifactId>
52+
<version>1.1</version>
53+
<scope>test</scope>
54+
</dependency>
55+
</dependencies>
56+
<build>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-surefire-plugin</artifactId>
61+
<configuration>
62+
<!-- required to ensure the test classes are used, not surefire's plexus-utils -->
63+
<childDelegation>true</childDelegation>
64+
<excludes>
65+
<exclude>org/codehaus/plexus/util/FileBasedTestCase.java</exclude>
66+
<exclude>**/Test*.java</exclude>
67+
</excludes>
68+
<systemProperties>
69+
<property>
70+
<name>JAVA_HOME</name>
71+
<value>${JAVA_HOME}</value>
72+
</property>
73+
<property>
74+
<name>M2_HOME</name>
75+
<value>${M2_HOME}</value>
76+
</property>
77+
</systemProperties>
78+
</configuration>
79+
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-enforcer-plugin</artifactId>
83+
<version>1.1.1</version>
84+
<executions>
85+
<execution>
86+
<id>enforce-java</id>
87+
<goals>
88+
<goal>enforce</goal>
89+
</goals>
90+
<configuration>
91+
<rules>
92+
<requireJavaVersion>
93+
<version>1.7.0</version>
94+
</requireJavaVersion>
95+
</rules>
96+
</configuration>
97+
</execution>
98+
</executions>
99+
</plugin>
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-compiler-plugin</artifactId>
103+
<configuration>
104+
<source>1.5</source>
105+
<target>1.5</target>
106+
</configuration>
107+
</plugin>
108+
<plugin>
109+
<groupId>org.apache.maven.plugins</groupId>
110+
<artifactId>maven-release-plugin</artifactId>
111+
<version>2.5.1</version>
112+
</plugin>
113+
</plugins>
114+
</build>
115+
</project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
553c5a129da11f6d56a2599ad0b21649a6d6de08
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
2+
#Thu Apr 04 10:32:47 CST 2019
3+
parent-48.pom>repo.jenkins-ci.org=

0 commit comments

Comments
 (0)