【Gerrit】持续集成工具Jenkins的安装配置与使用过程中遇到的问题整理
1.下载war包
https://jenkins.io/download/
2.安装
java -jar jenkins.war
Error:
Feb 21, 2019 2:17:25 AM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start Jettyat winstone.Launcher.<init>(Launcher.java:186)at winstone.Launcher.main(Launcher.java:354)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at Main._main(Main.java:344)at Main.main(Main.java:160)
Caused by: java.net.BindException: Address already in useat sun.nio.ch.Net.bind0(Native Method)at sun.nio.ch.Net.bind(Net.java:433)at sun.nio.ch.Net.bind(Net.java:425)at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)at org.eclipse.jetty.server.Server.doStart(Server.java:395)at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)at winstone.Launcher.<init>(Launcher.java:184)... 7 more
解决:
修改Jenkins端口java -jar jenkins.war --httpPort=8081
jenkins plugin提示: Update information obtained: 不可用 ago;
出现堆栈错误;
解决:
我们将.jenkins/hudson.model.UpdateCenter.xml文件内容中的https://updates.jenkins.io/update-center.json改为http://updates.jenkins.io/update-center.json即可;即为https协议改为http协议;然后我们重启一下jenkins,插件即可正常搜索访问;
--------------------------------------------------------------------------------------------------
jenkins时区设置为上海时间
打开 【系统管理】->【脚本命令行】运行下面的命令
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'Asia/Shanghai')
jenkins 关闭和重启实现方式.
1、关闭Jenkins
只需要在访问jenkins服务器的网址url地址后加上exit。例如我jenkins的地址http://localhost:8080/,那么我只需要在浏览器地址栏上敲下http://localhost:8080/exit 网址就能关闭jenkins服务.
2、重启Jenkies
http://localhost:8080/restart
3、重新加载配置信息
http://localhost:8080/reload
3.项目配置(gerrit提交patch动态触发jenkins自动编译)
①建立gerrit服务器连接
②确保手动触发的可执行性
③项目动态触发条件配置
4.构建脚本
以下是构建脚本可能需要的一些参数,仅供参考:
-----------------------------------------------------------Gerrit--triggered--parameters-------------------------------------------------------------
Trigger the build on Gerrit events.
The triggered build will be provided with the following parameters:
For all events
GERRIT_PROJECT: The name of the project.
GERRIT_EVENT_TYPE: The type of this event.
GERRIT_EVENT_HASH: A unique hash making all triggered builds unique in the queue.
GERRIT_EVENT_ACCOUNT: The name and email of the account associated with the event, if any. "Name" <name@somewhere.com>.
GERRIT_EVENT_ACCOUNT_NAME: The name of the account associated with the event, if any.
GERRIT_EVENT_ACCOUNT_EMAIL: The email of the account associated with the event, if any.
GERRIT_NAME: The name of the Gerrit instance that provided the event.
GERRIT_HOST: The hostname of the Gerrit instance that provided the event.
GERRIT_PORT: The port number of the Gerrit instance that provided the event.
GERRIT_SCHEME: The protocol name of the Gerrit instance that provided the event.
GERRIT_VERSION: The version number of the Gerrit instance that provided the event.
For events on a change (Patch set created, Draft published, Change merged, Change abandoned, Change restored, Comment added)
GERRIT_CHANGE_ID: The Change-Id.
GERRIT_CHANGE_SUBJECT: The first line of the commit message.
GERRIT_CHANGE_COMMIT_MESSAGE: The full commit message, UTF-8 Base64 encoded. (Only when Gerrit version is 2.8 or above).
GERRIT_CHANGE_NUMBER: The change number.
GERRIT_CHANGE_URL: The URL to the change.
GERRIT_PATCHSET_NUMBER: The Patch Set number.
GERRIT_PATCHSET_REVISION: The Patch Set revision id.
GERRIT_BRANCH: The name of the branch.
GERRIT_TOPIC: The name of the topic.
GERRIT_REFSPEC: The ref-spec. (refs/changes/xx/xxxx/z).
GERRIT_CHANGE_OWNER: The name and email of the owner of the change "Name" <name@somewhere.com>.
GERRIT_CHANGE_OWNER_NAME: The name of the owner of the change.
GERRIT_CHANGE_OWNER_EMAIL: The email of the owner of the change.
GERRIT_PATCHSET_UPLOADER: The name and email of the uploader of the Patch Set "Name" <name@somewhere.com>.
GERRIT_PATCHSET_UPLOADER_NAME: The name of the uploader of the Patch Set.
GERRIT_PATCHSET_UPLOADER_EMAIL: The email of the uploader of the Patch Set.
GERRIT_PATCHSET_ABANDONER: The name and email of the abandoner of the Patch Set "Name" <name@somewhere.com>.
GERRIT_PATCHSET_ABANDONER_NAME: The name of the abandoner of the Patch Set.
GERRIT_PATCHSET_ABANDONER_EMAIL: The email of the abandoner of the Patch Set.
GERRIT_PATCHSET_RESTORER: The name and email of the restorer of the Patch Set "Name" <name@somewhere.com>.
GERRIT_PATCHSET_RESTORER_NAME: The name of the restorer of the Patch Set.
GERRIT_PATCHSET_RESTORER_EMAIL: The email of the restorer of the Patch Set.
Additionally for Change merged events
GERRIT_NEWREV: The revision of the merge commit.
Additionally for Comment added events
GERRIT_EVENT_COMMENT_TEXT: The comment posted to Gerrit, UTF-8 Base64 encoded.
For Reference updated events
GERRIT_REFNAME: Ref name within project.
GERRIT_OLDREV: The old value of the ref, prior to the update.
GERRIT_NEWREV: The new value the ref was updated to.
The parameters will be available to the build as environment variables. E.g. $GERRIT_REFSPEC
转载于:https://www.cnblogs.com/wucaiyun1/p/11016723.html
【Gerrit】持续集成工具Jenkins的安装配置与使用过程中遇到的问题整理相关推荐
- python 持续集成工具_持续集成工具: Jenkins学习
持续集成工具: Jenkins学习 -- 部分内容收集自网络,如有侵权,请联系作者删除 一. 概念 在过去的开发整体流程中,是所有人写好代码之后统一进行合并(svn,git),然后进行测试,确保准发布 ...
- 【云原生 • DevOps】一文掌握持续集成工具 Jenkins
目录 一.持续集成工具 Jenkins 介绍 1. 什么是持续集成 2. Jenkins 介绍 二.Jenkins 的安装与部署 1. 安装 Jenkins 2. 本地访问 Jenkins 3. 插件 ...
- 持续集成工具Jenkins学习4 Idea集成Jenkins插件
持续集成工具Jenkins学习4 Idea集成Jenkins插件 一.功能简介 二.安装Idea插件 1. 搜索安装 2. 设置 三.Jenkins开启CSRF 四.使用 一.功能简介 Idea可以方 ...
- 持续集成之 Jenkins 的安装与配置(一)
一.持续集成的概念 Jenkins 是一个开源软件项目,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能.Jenkins是基于 Java 开发的一种持续集成工具,用于监控持续重复的工作,功能包 ...
- jenkins 忘记密码_持续集成工具Jenkins 在CentOS系统下安装
一.Jenkins简介 Jenkins是一个开源的持续集成工具,用于持续.自动的构建.测试.发布项目.Jenkins使用Java开发,可与版本管理工具集成使用. Jenkins支持UI操作来部署流水线 ...
- 中小型研发团队架构实践:高效率、低风险,一键发布并测试的持续集成工具Jenkins...
一.Jenkins 简介 \\ 当每月发布次数变得越来越多时,如超过 200 次,发布工作人员的工作量会翻倍,此时由人工发布操作失误引起的风险会变得越来越大.为了提高项目的发布效率,也为了降低由人工操 ...
- 持续集成工具jenkins的部署--Windows篇
一.前言 Jenkins是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能.本文使用Jenkins构建githu ...
- 如何做好持续集成和部署?你不容错过的持续集成工具—Jenkins
持续集成是一种软件开发实践,即团队开发成员经常集成他们的工作,通常每个成员每天至少集成一次,也就意味着每天可能会发生多次集成.每次集成都通过自动化的构建(包括编译,发布,自动化测试)来验证,从而尽快地 ...
- 持续集成工具 jenkins
研究比较深入的博客地址: http://blog.csdn.net/wangmuming/article/category/2167947 Jenkins安装与配置 2 Jenkins安装 在最简单的 ...
最新文章
- JavaScript sync and async(同步和异步)
- 图神经网络学习一(浅谈embedding)
- arthas使用示例:profiler火焰图(CPU)
- 大道至简读后感(七八章)
- Oracle事务处理
- mysql数据库优化语句_【MySQL】10条SQL优化语句,让你的MySQL数据库跑得更快!
- Leave the world behind,山巅雪莲的再次绽放
- 甲骨文裁员事件的思考
- mysql5.7架设征途服务器,征途服务端架设详细教程
- 事业单位招聘计算机岗位考试题,计算机考试题库:计算机考试练习题(136)
- Matlab LZW编码
- bim 模型web页面展示_HTML5/WebGL技术BIM模型轻量化Web浏览解决方案
- 在python平台上利用pymol来查找PDB文件中蛋白质的相互作用位点
- 【学习笔记】深蓝学院-三维点云处理
- 初识C语言之详解char类型
- 第三课 DedeCMS仿站-更换主页模板
- 卡巴斯基互联网安全套装(KIS)7.0官方简体中文版
- 《世界因你不同:李开复自传》引言:从心选择
- 区块链革命:从《失控》说起
- Linux Ubuntu系统台式电脑安装外置USB无线网卡驱动(以net-core磊科NW392无线网卡为例)