Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2a7cfa6
Added Jenkinsfile
xbsoft Apr 30, 2018
c0acdb1
Delete Jenkinsfile
xbsoft Apr 30, 2018
435746c
Added Jenkinsfile
xbsoft Apr 30, 2018
b8394d6
Added Jenkinsfile
xbsoft Apr 30, 2018
db36e13
Added Jenkinsfile
xbsoft Apr 30, 2018
c7f7ecc
Added Jenkinsfile
xbsoft Apr 30, 2018
f11f476
Added Jenkinsfile
xbsoft Apr 30, 2018
e23cdd1
Added Jenkinsfile
xbsoft Apr 30, 2018
c2d7275
http://demo.redmine.org/issues/216401
xbsoft Apr 30, 2018
d9d1030
Update README.md
xbsoft May 2, 2018
fe76136
Update index.jsp
xbsoft May 2, 2018
254724b
Update README.md
xbsoft May 2, 2018
bb5ba1d
Add files via upload
xbsoft May 13, 2018
b83cf2f
Added Testing phase
xbsoft May 13, 2018
85b114a
skip NexusUpload
xbsoft May 14, 2018
f7b3a35
skip upload
xbsoft May 14, 2018
7b992b0
add Upload war to Nexus
xbsoft May 14, 2018
b623a76
split maven build and test
xbsoft May 20, 2018
acb9edb
fix UT
xbsoft May 20, 2018
f4689f2
fix build
xbsoft May 20, 2018
d3f0553
Added Jenkinsfile
xbsoft Sep 8, 2018
3d469a0
upgrade sonar for maven
xbsoft Sep 9, 2018
b510e57
delete -f POM.xml -e -B
xbsoft Sep 9, 2018
fd7a869
first time must to use install for plugins preparing
xbsoft Sep 9, 2018
9ac1770
Added Jenkinsfile
xbsoft Oct 15, 2018
d1009b9
Update Jenkinsfile
xbsoft Oct 16, 2018
26df4ff
Added Jenkinsfile
xbsoft Oct 16, 2018
b79b5b5
demo9
xbsoft Nov 12, 2018
635fdf7
练习
xbsoft Nov 12, 2018
e99761f
demo9.2
xbsoft Nov 12, 2018
d157ecc
updated readme
Nov 12, 2018
0e7fe9c
test
xxjj12345 Nov 12, 2018
3ac6c4a
modified readme
Nov 12, 2018
9b402e1
songyang add
sy09 Nov 12, 2018
06cdbe9
Merge pull request #2 from xbsoft/5thparty
xbsoft Nov 12, 2018
493e893
test
zjm23 Nov 12, 2018
abece09
Merge branch 'master' of https://github.com/xbsoft/SimpleMavenJunitWe…
zjm23 Nov 12, 2018
d966af8
test
dqqinning Nov 12, 2018
54a106c
提交文件
yaopeike Nov 12, 2018
9232f93
Merge branch 'master' of https://github.com/xbsoft/SimpleMavenJunitWe…
yaopeike Nov 12, 2018
0d010b8
test
Nov 12, 2018
055ba5d
Merge branch 'master' of https://github.com/xbsoft/SimpleMavenJunitWe…
Nov 12, 2018
0344b38
Merge branch 'master' of https://github.com/xbsoft/SimpleMavenJunitWe…
yaopeike Nov 12, 2018
0c35d4d
Added Jenkinsfile
xbsoft Feb 28, 2019
b7b85dd
demo2
Jan 16, 2020
2f8ac6a
demo
Jan 16, 2020
d8d41dc
demo
xbsoft Jan 16, 2020
503f2a5
Update README.md
xbsoft Jan 16, 2020
dd814dd
Update Jenkinsfile
xbsoft Jan 16, 2020
8f3f2f4
Update Jenkinsfile
xbsoft Jan 16, 2020
ed6c844
Update Jenkinsfile
xbsoft Jan 17, 2020
a743a8b
Update Jenkinsfile
xbsoft Jan 17, 2020
16fc45d
Update Jenkinsfile
xbsoft Jan 17, 2020
2e6eeb4
Update Jenkinsfile
xbsoft Jan 21, 2020
1c755dc
Update Jenkinsfile
xbsoft Jan 21, 2020
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
Binary file added GIT练习手册.docx
Binary file not shown.
271 changes: 271 additions & 0 deletions JMeterDemo.jmx

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
pipeline {
agent any
stages {
stage('Code') {
steps {
git 'https://github.com/xbsoft/SimpleMavenJunitWebApp'
}
}


stage('Build and Test') {
parallel {
stage('Build') {
steps {
readFile 'pom.xml'
script {
if(isUnix() == true) {
sh 'mvn install -DskipTests'
}else {
bat 'mvn install -DskipTests'
}
}
}
}

stage('UnitTest') {
steps {
script {
if(isUnix() == true) {
sh 'mvn package'
}else {
bat 'mvn package'
}
}
}
}
}
}
stage('Check') {
parallel {
stage('Check') {
steps {
script {
if(isUnix() == true) {
sh 'mvn -e -B sonar:sonar -Dsonar.host.url=http://106.14.68.164:9000 -Dsonar.sources=src\\main -Dsonar.scm.provider=git -Dsonar.java.binaries=target && exit %%ERRORLEVEL%%'
}else {
bat 'mvn -e -B sonar:sonar -Dsonar.host.url=http://106.14.68.164:9000 -Dsonar.sources=src\\main -Dsonar.scm.provider=git -Dsonar.java.binaries=target && exit %%ERRORLEVEL%%'
}
}
}
}
stage('checkx') {
steps {
script {
if(isUnix() == true) {
sh 'ls -l'
}else {
bat 'dir'
}
}
}
}
}
}
stage('NexusUpload') {
steps {
sleep 10
build 'NexusUpload'
}
}
stage('Selenium') {
steps {
build 'SeleniumDemo'
}
}
stage('Jmeter') {
steps {
build 'JMeterDemo'
}
}
}
post {
always {
junit '**/reports/junit/*.xml'

}

}
}
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# SimpleMavenJunitWebApp
# SimpleMavenJunitWebApp
# demo 9.2

演示目标
课程学员:初级、中级、高级
角色:开发,测试,项目经理,产品经理
价值: 快速引入业界最佳实践,短期落地,长期规划,系统化培训与实施,能力培养,社区引荐等

范围
CI/CD/DevOps

基础
JDK
Tomcat

RedMine/GitHub/Maven/Jenkins/SonarQube/JUnit样例
Jenkins Job:
MavenGitDemo
步骤:
指定Redmine演示项目
从github取demo代码
使用Maven编译、运行JUnit
使用Maven调用SonarQube
部署war到Tomcat

效果:
手动触发完整编译
在Jenkins编译结果的变更说明中link到RedMine的记录
链接编译结果至Sonar报告
在编译结果中查看JUnit测试结果

后续
编译时从Nexus中取得依赖项
编译后将新版本存入Nexus
在测试后进行一键提权


工具链
code, GitHub
IDE
Jira/Confluence
Maven
Jenkins
SonarQube
Zephyr
Selenium
Jmeter
Docker
K8s
Hygieia
Binary file added Zjm.docx
Binary file not shown.
Empty file added licedse
Empty file.
1 change: 1 addition & 0 deletions one.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
demo
Empty file added qn.txt
Empty file.
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hello shuai
demo2
1 change: 1 addition & 0 deletions songyang.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello git
1 change: 1 addition & 0 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<body>
<h2><font face="verdana" color="green">Welcome TO AdaptNext</font></h2>
<i><font face="verdana" color="green">Version 101</font></i>
<i><font face="verdana" color="green">Author: You</font></i>
</body>
</html>
1 change: 1 addition & 0 deletions src/test/java/com/nijjwal/SimpleTest.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//demo9
package com.nijjwal;

import static org.junit.Assert.assertEquals;
Expand Down
Empty file added src/test/test.docx
Empty file.
1 change: 1 addition & 0 deletions testxj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
qwqweqasd
Empty file added two.txt
Empty file.
1 change: 1 addition & 0 deletions ypk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git is a tool