博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jenkins安装
阅读量:5991 次
发布时间:2019-06-20

本文共 41828 字,大约阅读时间需要 139 分钟。

hot3.png

jenkins

2018年06月03日 19:44:55  阅读数:359

一,部署git(编译安装方式)

安装依赖包:

[root tmp]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker -y
git官网下载最新版本GIT
软件:git-2.9.5.tar.gz
安装git:
解压并cd到解压目录
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
修改环境变量:
[root bin]# vim /etc/bashrc 
PATH=$PATH:$HOME/bin:/usr/local/git/bin
[root bin]# source /etc/bashrc
测试是否安装成功:
[root ~]# git --version
git version 2.9.5

二,jdk环境部署

下载软件:

jdk-8u151-linux-x64.tar.gz
注意:不能用jdk9和jdk10
解压安装:
[root /]# tar xvzf jdk-8u151-linux-x64.tar.gz -C /usr/local/
[root@jenkins /]# cd /usr/local/
[root@jenkins local]# mv jdk1.8.0_151 jdk
修改环境变量:
#vim /etc/bashrc 追加以下配置
JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin
# source /etc/bashrc

三,部署maven

下载和解压Maven:
官方下载地址:
apache-maven-3.5.3-bin.tar.gz
[root@server 1802]# tar xvzf apache-maven-3.5.3-bin.tar.gz -C /usr/local/
[root@server 1802]# mv /usr/local/apache-maven-3.5.3/ /usr/local/maven
修改环境变量
[root@server 1802]# vim /etc/bashrc
export M2_HOME=/usr/local/maven
export M2=$M2_HOME/bin
PATH=$M2:$PATH:$HOME/bin:/usr/local/git/bin
export JAVA_HOME=/usr/local/jdk
export PATH
[root@server 1802]# source /etc/bashrc
测试maven是否安装成功:
[root@server 1802]# mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-25T03:49:05+08:00)
Maven home: /usr/local/maven
Java version: 9.0.1, vendor: Oracle Corporation
Java home: /usr/local/jdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-693.el7.x86_64", arch: "amd64", family: "unix"

四,部署tomcat

安装Jdk8.0 注意:是8版本的JDK

官网下载tomcat:
apache-tomcat-9.0.1.tar.gz 
解压部署:
[root@server 1802]# tar xvzf apache-tomcat-9.0.1.tar.gz -C /usr/local/
[root@server 1802]# mv /usr/local/apache-tomcat-9.0.1/ /usr/local/tomcat
定义Tomcat所需环境变量:
# vim /etc/profile //定义Tomcat环境变量
CATALINA_HOME=/usr/local/tomcat //Tomcat安装目录
export CATALINA_HOME
# source /etc/profile
启动tomcat:
#/usr/local/tomcat/bin/startup.sh
关闭tomcat:
#/usr/local/tomcat/bin/shutdown.sh
配置tomcat的角色和用户(暂时用不到):
在tomcat目录conf文件夹下tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="manager"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-gui,admin,manager,manager-script"/>

五,部署Jenkins

官网下载jenkins:

软件名称:
jenkins.war
部署jenkins.war到tomcat下:
[root@server 1802]# cp jenkins.war /usr/local/tomcat/webapps/
启动tomcat: 注意启动tomcat会自动解压webapps下的war包
[root@server webapps]# /usr/local/tomcat/bin/startup.sh 
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
登陆jenkins:
浏览器:
添入以下文件密码到上图页面中:点击continue
[root@server jenkins]# cat /root/.jenkins/secrets/initialAdminPassword
568436617d584c2b96f19e3de8012d47
选择suggested的插件进行下载:如图
接下来进入到这个.等待安装结束:
因为网速原因,插件可能下载失败,没关系,把他们记录下来,比如下图的两个插件,点击继续,进去之后手动重新安装未安装好的插件

告一段落。

--------------------
--------------------
插件安装
我们配置的是 git + maven 方式的 自动化部署 所以git和maven的相关插件是必须的 还有一个ssh用于机器间的文件传送
3个必须的插件:
GIT plugin (可能已经默认安装了) 
Publish Over SSH (远程Shell) 
安装插件Deploy to container:
作用:
支持自动化将代码部署到tomcat容器
安装过程:
系统管理-->插件管理-->可选插件-->过滤Deploy to container-->勾选,点击下边的按钮:直接安装,这个可能时间较久,等待即可。

安装完之后,如果勾选了:安装完成后重启jenkins 那么会重启jenkins。

安装插件:Maven Integration
作用:
jenkins 利用maven编译,打包,所需插件
安装过程:同第一个插件
安装git相关插件,安装过程同第一个插件
检查已安装好的插件GIT plugin,如果没有进行安装,和上边的步骤一样
安装插件:Publish Over SSH,和上边的步骤一样
--------------------
检查错误配置
左侧:点击“系统管理”
1.如果有“编码问题”错误,在Tomcat–>conf–>server.xml文件中修改即可
2.如果有”反向代理设置有误“错误,不管他
--------------------
Jenkins系统设置
注意:这里没有强调的都设置为默认即可
插件已经基本准备好了,下面还要再做一些基础配置
要配置的有
jdk maven 和git
系统管理->Global Tool Configuration,配置jdk,git,maven的根目录
配置JDK根目录:注意不能是JDK9.0,切忌
配置git命令绝对路径:注意这里不是git安装目录,git也可以rpm安装,不能低于1.7版本
配置maven根目录:
配置ssh相关的配置:
配置publish over ssh:
Passphrase:密码(key的密码,如果你设置了)
Path to key:key文件(私钥)的路径(下面的key和这个2选1)
Key:将私钥复制到这个框中
Disable exec:禁止运行命令
这里的私钥是jenkins服务上root账户的私钥,需要事先先把公钥传给下面设置的被远程sshserver
在jenkins上,我这里实际操作的是一台远程机器名字git1,地址155,只是作为例子
[root@server .ssh]# ssh-copy-id -i 10.0.0.155
[root@server .ssh]# ssh 10.0.0.155
Last login: Wed May 23 01:04:32 2018 from 10.0.0.154
[root@git1 ~]# 
注意:不要纠结我下面图片中的IP地址
创建一个maven任务:
这里使用公有仓库
:公有仓库可以不用配置credentials,
注:私有仓库的使用见--“1个完整创建任务过程”
下图填写的是一个应用的github地址:
在Build中的Goals and options添加:
clean package -Dmaven.test.skip=true
这里的文件夹和脚本要事先创建好:我现在这一步实验是给远程的git1(地址10.0.0.155)远程操作脚本,用脚本实现war包部署,没写完整脚本,这里只是例子
在git1上创建/jenkins/war和/jenkins/sh/deploy.sh脚本
最后那个是执行的脚本
 
 

这是一个简单脚本,你需要改成相应的操作就行了. 关闭tomcat, 备份,清理,自动解压,启动tomcat。我这里只是演示能将war包传递过来,并且移动重命名了

.

看执行结果:
...
去git1上查看结果:
[root@server .ssh]# ssh 10.0.0.155
Last login: Wed May 23 01:06:14 2018 from 10.0.0.154
[root@git1 ~]# cd /jenkins/
[root@git1 jenkins]# ls
easy-springmvc-maven.war sh war

六,私有仓库源码管理

如果是私有仓库:地址要这样写

报错如果是私有库,必须添加一个Credentials(详情见子目录-credentials)
Failed to connect to repository : Command "/usr/local/git/bin/git -c core.askpass=true ls-remote -h  HEAD" returned status code 128:
stdout: 
stderr: fatal: Unable to find remote helper for 'http'
或者
Failed to connect to repository : Command "git ls-remote -h git@xxxxx.com:xxx/dev_test.git HEAD" returned status code 128:
stdout: 
stderr: Permission denied, please tryagain. 
Permission denied, please try again. 
Permission denied(publickey,gssapi-keyex,gssapi-with-mic,password). 
fatal: The remote end hung up unexpectedly原因:没有配置git的ssh key。
解决方法:执行下面的命令,生成key
ssh-keygen -t rsa -C "admin@example.com"然后将~/.ssh/目录下的id_rsa.pub中的公钥,放到git的ssh key中。再在Jenkins中创建新的Credentials。类型是SSH Username with private key。Username使用ssh-keygen中用到的邮箱,Private Key中选择“From the Jenkins master ~/.ssh”即可。修改后,问题解决。

一个完整创建任务过程

本节意在演示私有仓库的应用

1.创建本地裸库
2.根据官方文档,从官方git下载一个hello world测试应用
官方地址:
另外一个demo也可以用:这里可以先下载下来
[root@server srv]# git clone 
正克隆到 'easy-springmvc-maven'...
remote: Counting objects: 45, done.
remote: Total 45 (delta 0), reused 0 (delta 0), pack-reused 45
展开对象中: 100% (45/45), 完成.
检查连接... 完成。
[root@server /]# cd srv/
[root@server srv]# ls
sample.git
[root@server srv]# git clone https://github.com/jenkins-docs/simple-java-maven-app.git
正克隆到 'simple-java-maven-app'...
remote: Counting objects: 88, done.
remote: Total 88 (delta 0), reused 0 (delta 0), pack-reused 88
展开对象中: 100% (88/88), 完成.
检查连接... 完成。
[root@server srv]# ls
sample.git simple-java-maven-app
[root@server srv]# cd simple-java-maven-app/
[root@server simple-java-maven-app]# ls
jenkins pom.xml README.md src
注:本节中没有的都是默认设置
左边点击“新建任务”:
1.
2.
3.
下面这张图只为作说明:
4.
5.最后保存后点击左边的“立即构建”:经过5分钟左右的构建过程(构建日志见子目录--一个完整的构建日志)成功
6.
构建开始截图:
...中间会有n多输出...
构建结束截图:

一个完整的构建日志

 

控制台输出

由用户 unknown or anonymous 启动

构建中 在工作空间 /root/.jenkins/workspace/simple-java-maven-app1 中
Cloning the remote Git repository
Cloning repository git@127.0.0.1:/srv/simple-java-maven-app
> /usr/local/git/bin/git init /root/.jenkins/workspace/simple-java-maven-app1 # timeout=10
Fetching upstream changes from git@127.0.0.1:/srv/simple-java-maven-app
> /usr/local/git/bin/git --version # timeout=10
using GIT_SSH to set credentials 
> /usr/local/git/bin/git fetch --tags --progress git@127.0.0.1:/srv/simple-java-maven-app +refs/heads/*:refs/remotes/origin/*
> /usr/local/git/bin/git config remote.origin.url git@127.0.0.1:/srv/simple-java-maven-app # timeout=10
> /usr/local/git/bin/git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> /usr/local/git/bin/git config remote.origin.url git@127.0.0.1:/srv/simple-java-maven-app # timeout=10
Fetching upstream changes from git@127.0.0.1:/srv/simple-java-maven-app
using GIT_SSH to set credentials 
> /usr/local/git/bin/git fetch --tags --progress git@127.0.0.1:/srv/simple-java-maven-app +refs/heads/*:refs/remotes/origin/*
> /usr/local/git/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> /usr/local/git/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 40f518f8ccad33cee30516308a31b4a6e501d844 (refs/remotes/origin/master)
> /usr/local/git/bin/git config core.sparsecheckout # timeout=10
> /usr/local/git/bin/git checkout -f 40f518f8ccad33cee30516308a31b4a6e501d844
Commit message: "Add initial Jenkinsfile"
First time build. Skipping changelog.
Parsing POMs
Discovered a new module com.mycompany.app:my-app my-app
Modules changed, recalculating dependency graph
Established TCP socket on 40008
[simple-java-maven-app1] $ /usr/local/jdk/bin/java -cp /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/maven/boot/plexus-classworlds-2.5.2.jar:/usr/local/maven/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/maven /usr/local/tomcat/webapps/jenkins/WEB-INF/lib/remoting-3.20.jar /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 40008
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /root/.jenkins/workspace/simple-java-maven-app1/pom.xml clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< com.mycompany.app:my-app >----------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.9 kB at 1.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (13 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (26 kB at 38 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 25 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (25 kB at 41 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (8.1 kB at 14 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (9.2 kB at 8.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (30 kB at 50 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 38 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (30 kB at 66 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (10 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (11 kB at 29 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (33 kB at 62 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 35 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (43 kB at 73 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (10 kB at 29 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 35 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (30 kB at 57 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.2 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (10 kB at 28 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (41 kB at 69 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (16 kB at 37 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (27 kB at 52 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.3 kB at 7.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (766 B at 2.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 5.9 kB/s)
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (45 kB at 36 kB/s)
[INFO] Downloaded from central:  (245 kB at 119 kB/s)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ my-app ---
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.5 kB at 4.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (9.0 kB at 24 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 37 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.4 kB at 10 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.1 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (8.4 kB at 22 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (8.4 kB at 24 kB/s)
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloaded from central: (13 kB at 33 kB/s)
[INFO] Downloaded from central:  (226 kB at 213 kB/s)
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ my-app ---
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.6 kB at 7.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (2.0 kB at 5.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.0 kB at 9.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (9.0 kB at 24 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.9 kB at 7.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (492 B at 1.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.7 kB at 17 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (998 B at 2.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.9 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.1 kB at 9.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 5.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.6 kB at 6.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.6 kB at 4.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.7 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.8 kB at 5.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.4 kB at 4.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (424 B at 1.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (3.9 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.7 kB at 4.9 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.1 kB at 6.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 6.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (7.1 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (1.3 kB at 3.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.3 kB at 9.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.3 kB at 9.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (17 kB at 43 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.8 kB at 16 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (8.7 kB at 25 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.8 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (12 kB at 16 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (889 B at 2.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.8 kB at 16 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (2.9 kB at 8.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.0 kB at 9.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.0 kB at 14 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (8.1 kB at 22 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (890 B at 737 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.8 kB at 7.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 39 kB/s)
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (35 kB at 68 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (21 kB at 22 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (116 kB at 119 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (29 kB at 22 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (9.9 kB at 7.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.9 kB at 4.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (24 kB at 15 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (30 kB at 17 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 7.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (37 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (13 kB at 6.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (87 kB at 35 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (49 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (86 kB at 30 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (38 kB at 13 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (10 kB at 3.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (194 kB at 58 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (43 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (6.8 kB at 1.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (61 kB at 14 kB/s)
[INFO] Downloaded from central:  (121 kB at 26 kB/s)
[INFO] Downloaded from central:  (223 kB at 46 kB/s)
[INFO] Downloaded from central:  (57 kB at 11 kB/s)
[INFO] Downloaded from central:  (152 kB at 13 kB/s)
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/.jenkins/workspace/simple-java-maven-app1/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ my-app ---
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.5 kB at 2.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (19 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (24 kB at 35 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.5 kB at 7.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.6 kB at 1.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.3 kB at 3.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (7.8 kB at 4.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (2.1 kB at 1.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.1 kB at 2.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 3.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 1.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 978 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.7 kB at 900 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.7 kB at 4.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.7 kB at 4.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 1.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.1 kB at 1.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (1.3 kB at 758 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.4 kB at 1.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.0 kB at 6.9 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.9 kB at 8.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (965 B at 1.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.7 kB at 1.9 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.4 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.5 kB at 2.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (22 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (32 kB at 45 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.1 kB at 3.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (12 kB at 20 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (2.2 kB at 122 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.2 kB at 874 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (889 B at 78 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.0 kB at 1.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 3.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (7.9 kB at 6.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.0 kB at 294 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.2 kB at 111 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.2 kB at 3.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.6 kB at 2.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 555 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.7 kB at 137 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.8 kB at 4.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.1 kB at 2.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (880 B at 313 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 3.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.1 kB at 3.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (1.3 kB at 120 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.0 kB at 804 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.8 kB at 537 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (8.4 kB at 13 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.1 kB at 4.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.1 kB at 1.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (815 B at 277 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.2 kB at 635 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (17 kB at 7.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (865 B at 650 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (3.6 kB at 5.9 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.1 kB at 7.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (20 kB at 29 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.8 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 20 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.1 kB at 2.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (19 kB at 6.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (690 B at 613 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (769 B at 583 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (1.2 kB at 979 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.8 kB at 4.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.3 kB at 4.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.0 kB at 6.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.8 kB at 4.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (19 kB at 7.9 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (145 B at 239 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.3 kB at 3.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.5 kB at 1.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.6 kB at 2.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (747 B at 514 B/s)
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (49 kB at 131 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (21 kB at 30 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (89 kB at 88 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (35 kB at 34 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (25 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 8.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (122 kB at 53 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (87 kB at 36 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (160 kB at 65 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (29 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (10 kB at 3.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (58 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (37 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (211 kB at 61 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (33 kB at 9.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (32 kB at 8.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.2 kB at 1.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 3.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.6 kB at 1.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (19 kB at 4.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (25 kB at 5.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (155 kB at 32 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (217 kB at 44 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (13 kB at 2.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (45 kB at 8.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (46 kB at 8.6 kB/s)
[INFO] Downloaded from central:  (121 kB at 21 kB/s)
[INFO] Downloaded from central:  (134 kB at 22 kB/s)
[INFO] Downloaded from central:  (358 kB at 44 kB/s)
[INFO] Downloaded from central:  (640 kB at 35 kB/s)
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/.jenkins/workspace/simple-java-maven-app1/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ my-app ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/.jenkins/workspace/simple-java-maven-app1/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ my-app ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/.jenkins/workspace/simple-java-maven-app1/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ my-app ---
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.0 kB at 4.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (2.5 kB at 2.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.5 kB at 9.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.6 kB at 1.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (16 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.8 kB at 3.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.5 kB at 626 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (3.5 kB at 5.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (17 kB at 21 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (42 kB at 37 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 21 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.7 kB at 234 B/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (9.3 kB at 15 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (23 kB at 30 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (13 kB at 6.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.2 kB at 2.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (31 kB at 41 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (316 kB at 323 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (263 kB at 219 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (118 kB at 91 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (10 kB at 7.7 kB/s)
[INFO] Downloaded from central:  (14 kB at 8.3 kB/s)
[INFO] Downloaded from central: (38 kB at 22 kB/s)
[INFO] Downloaded from central:  (35 kB at 16 kB/s)
[INFO] Downloaded from central:  (232 kB at 61 kB/s)
[INFO] Surefire report directory: /root/.jenkins/workspace/simple-java-maven-app1/target/surefire-reports
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.4 kB at 7.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.3 kB at 4.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (37 kB at 33 kB/s)
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mycompany.app.AppTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: 
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.BuildInfoRecorder$1; see: 
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ my-app ---
[INFO] Downloading from central: 
[INFO] Downloaded from central: (2.3 kB at 5.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (22 kB at 30 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (24 kB at 36 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.9 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.3 kB at 10 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (5.4 kB at 15 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (3.1 kB at 9.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.6 kB at 4.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.2 kB at 3.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (7.8 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (11 kB at 20 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (748 B at 2.3 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (3.8 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (22 kB at 36 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.0 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (5.5 kB at 15 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (11 kB at 25 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (6.6 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.2 kB at 4.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (910 B at 2.6 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.4 kB at 16 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.2 kB at 6.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.5 kB at 7.4 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.7 kB at 5.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (7.7 kB at 21 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (2.1 kB at 5.7 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.7 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.7 kB at 5.0 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (4.3 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.6 kB at 14 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.6 kB at 13 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (10 kB at 24 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (48 kB at 52 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (13 kB at 32 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (62 kB at 55 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 29 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.3 kB at 14 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.1 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (22 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.9 kB at 13 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (3.8 kB at 11 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (11 kB at 21 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (47 kB at 53 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (13 kB at 31 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (15 kB at 34 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.9 kB at 5.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (1.5 kB at 4.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (5.3 kB at 15 kB/s)
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (49 kB at 56 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (165 kB at 95 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (472 kB at 270 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (153 kB at 79 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (47 kB at 22 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (38 kB at 17 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (30 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (51 kB at 19 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (148 kB at 51 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central: (202 kB at 68 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (14 kB at 4.5 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (61 kB at 18 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (74 kB at 22 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (106 kB at 29 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (4.3 kB at 1.1 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (46 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (13 kB at 3.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (29 kB at 6.8 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (108 kB at 24 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (52 kB at 12 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (24 kB at 5.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (86 kB at 17 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (154 kB at 28 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (58 kB at 9.2 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (426 kB at 64 kB/s)
[INFO] Downloading from central: 
[INFO] Downloaded from central:  (187 kB at 28 kB/s)
[INFO] Downloaded from central:  (527 kB at 78 kB/s)
[INFO] Downloaded from central:  (100 kB at 14 kB/s)
[INFO] Downloaded from central:  (247 kB at 33 kB/s)
[INFO] Downloaded from central:  (209 kB at 25 kB/s)
[INFO] Building jar: /root/.jenkins/workspace/simple-java-maven-app1/target/my-app-1.0-SNAPSHOT.jar
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: 
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:30 min
[INFO] Finished at: 2018-05-22T22:31:59+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /root/.jenkins/workspace/simple-java-maven-app1/pom.xml to com.mycompany.app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.pom
[JENKINS] Archiving /root/.jenkins/workspace/simple-java-maven-app1/target/my-app-1.0-SNAPSHOT.jar to com.mycompany.app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.jar
channel stopped
Finished: SUCCESS

七,credentials

步骤1:

在 jenkins 中使用 git 插件从仓库中 pull 代码的时候会要求 jenkins 必须有 pull 权限(尤其是当git开启了ssh认证的时候),在配置 jenkins job 的时候有以下这些方法配置 ssh key:
登陆 jenkins ,切换到 jenkins 用户(wing直接使用的root账户),生成 ssh key,然后把 公钥添加到 git 服务器上.
#su - jenkins //切换到 jenkins HOME 目录
#ssh-keygen -t rsa // 生成 ssh key, 复制 xxx.pub 公钥到 git 服务器上即可.
步骤2:在jenkins界面,依次点击: 
Credentials -> System -> Add domain: 
Domain Name: 填写你git服务器的地址,如 github.xxx.com(wing填写的IP地址,127.0.0.1)
Description: 随便写一点描述,如 This is the Credential for github
如图所示:
点击 ok 后,再点击 “adding some credentials?”
进入页面后,可以选择 Username with password 或者 SSH Username with private key, 根据你的情况选择,这里我们选择 Username with private key:
Username: 随便起一个名字,以便在创建 Job 的时候使用该 Credential 
Private Key:可以指定文件,也可以使用默认的 ~/.ssh,当然也可以直接将私钥复制粘贴到此处。 
Passphrase: 如果你在创建 ssh key 的时候输入了 Passphrase 那就填写相应的Passphrase,为空就不填写 
ID: 空 
Description: 空
如图:
点击 ok 后 Credential 就创建好了。
如果你再新建 Job 就可以看到我们的 Credential 选项了:

八,重新安装jenkins

重新初始化jenkins环境

只需要删除安装jenkins用户的主目录(~)下的(.jenkins)文件夹,然后重启,就可以重新配置jenkins 
#rm -rf /root/.jenkins

九,排错

问题1:jenkins访问一直处于等待状态

tomcat日志显示如下信息:
[root@jenkins logs]# tail -f /usr/local/tomcat/logs/catalina.out 
WARNING [Handling GET /jenkins/login from 10.0.0.174 : http-nio-8080-exec-3 HudsonIsLoading/index.jelly] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/lib/layout/breadcrumbs.jelly] to the cache for web application [/jenkins] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
解决方案: 只要在$CATALINA_BASE/conf/context.xml里增加资源最大可缓存的大小就行了,大小可按自己的需要定义 
# vim /usr/local/tomcat/conf/context.xml 
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resources
cachingAllowed="true"
cacheMaxSize="100000"
/>
</Context>
最后重起tomcat,问题解决!
问题2:剩余内存必须大于2G
tomcat启动之前的内存:

tomcat启动之后的内存:

问题3:插件下载后继续下面初始化完成点开始的时候跳到一个空白页面
解决:点击地址栏左边的后退按钮即可进入正常页面

接着上面的错误,返回之后虽然进入正常界面,但是会有如下提示:

手动安装这些插件

 

 

 

 

 

 

 

 

 

 

 收藏 

 分享

转载于:https://my.oschina.net/u/3367404/blog/3001795

你可能感兴趣的文章
SSM001/构建maven多模块项目
查看>>
ffmpeg在shell循环中只执行一次问题
查看>>
能力积累方向
查看>>
java多线程编程之使用Synchronized关键字同步类方法
查看>>
路由vue-router
查看>>
Paxos算法
查看>>
Django之ModelForm组件
查看>>
统计翻译系统中的开源工具们
查看>>
【Rectangle】C++引用问题
查看>>
基本类型数据转换(int,char,byte)
查看>>
前三章
查看>>
SQL学习——基础语句(3)
查看>>
ZendFrameWork application.ini 配置
查看>>
关于thinkpadU盘系统盘启动不了解决方法
查看>>
如何看k线图
查看>>
结对-五子棋游戏-开发过程
查看>>
团队-及格成绩查询系统-团队信息
查看>>
[C++]移位
查看>>
linux上apache并发数与服务器内存关系计算!
查看>>
Cocos2dx 场景切换动画
查看>>