文档章节

Jenkins Smiple use

莫忆往西
 莫忆往西
发布于 2015/07/05 17:42
字数 398
阅读 25
收藏 0

Jenkins

Feature

  • Building/testing software projects continuously
  • Monitoring executions of externally-run jobs

Install

official website

  1. Download windows installer and install as usual.
  2. In the install directory, run java -jar jenkins.war, and view the manager page at localhost:8080
  3. If the port of default 8080 is conflict with other application, jetty can not start normally. So run java -jar jenkins.war --httpPort=8980 which using 8980 as bind port.

For windows installer, it will install a windows service called Jenkins,the service is start when computer is startup. We can modify the jenkins.xml in the intall directory to change the default config of the service. This service use the intalled path as the %JENKINS_HOME%.

There are some instructions about the service in jenkins.xml:

  • jenkins.exe stop to stop the service
  • jenkins.exe uninstall to uninstall the service.

It's more freely to run a bat file start the user defined service. Such as change the %JENKINS_HOME%. I dont't like run the service in the intaller path or my home directory.

set JENKINS_HOME=E:\Jenkins
cd /d %JENKINS_HOME%
rem copy the jenkins.war to %JENKINS_HOME%
java -jar %JENKINS_HOME%\jenkins.war --httpPort=8980

Add New Job

One porject continuous integration called a Job. The new jobs are lie in %JENKINS_HOME%\job\

  • Set %WORKSPACE%: Advanced Project Options -> Use custom workspace, Input the path for the root path of the Job.

  • VC project bulid Build->Execute Windows batch command:

"D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" "%WORKSPACE%\proj.win32\PopClear.sln" /Build "Debug|Win32"
  • Path the application after build
    Add another Execute Windows batch command and input the .bat file need to run.
del release\PopClear.exe

copy ..\Resources\*.png release\
copy Debug.win32\PopClear.exe release\

rem 7z a -tzip %date:~0,10%_%time:~0,2%%time:~3,2%%time:~6,2%_release.zip .\release\*

7z a -tzip %date:~0,10%_release.zip .\release\*
  • Post-build Actions Jenkins could archive the build after build. Below the option Archive the arififacts, type *.zip in the Files to archive field. So it will copy the *.zip file to the build path, and show it in the job's home page.

Plugin

There are two ways to install a plugin for Jenkins:

  • Manually offline: Download plugin file *.hpi, put it into %JENKINS_HOME%\plugins\ (Not in the install path)
  • Automatically online: At the the manage page, select which plugin you want, in this way the system will install the dependence plugin automatically. Manage Jenkins->Manage Plugins

© 著作权归作者所有

莫忆往西
粉丝 2
博文 14
码字总数 17277
作品 0
西安
私信 提问
Jenkins的安装及部署

Jenkins 是开源的自动化集成部署应用,具有强大的社区支撑,丰富的插件支持。 安装 安装之前,确保你拥有以下最基本的环境保障: Java 7 256MB free memory 1GB+ free disk space Jenkins 官方...

唯慕清风
2016/11/13
36
0
关于oauth2 javascript获取code和access token的问题

现在有没有办法用js手段通过app key、app secret、authorizeurl、tokenurl用js获取到access_token 我已经用java实现没问题了但是用js没办法获取到,code可以获取到但是请求tokenurl的时候 用...

stevenliu
2014/03/21
4.4K
2
将Jenkins job上构建产物上传到远程FTP服务器

copy命令: copy vickytesting.png ippictures 这个不行,只能在本地电脑上不同地方复制。即使你写的target目录里面是远程IP地址,也会给你生成一个IP对应名称的文件夹,气死人: 2. xcopy命...

还是要坚强
2018/04/18
704
0
mac 卸载jenkins

依次执行下列命令就可以卸载mac上的jenkins sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist sudo rm !$ sudo rm -rf /Applications/Jenkins "/Library/Application Su......

劲风online
2016/06/21
1K
0
Dockerizing Jenkins 2, Part 1: Declarative Build Pipeline With SonarQube Analysis

In this article, I am going to demonstrate: Running Jenkins on Docker. Automation of Jenkins plugin installation on Docker. Configuring Java and Maven tools on Jenkins, first ma......

Kayan Azimov
2017/12/27
0
0

没有更多内容

加载失败,请刷新页面

加载更多

电子字典C语言链表版

#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>struct dict{ char *key; char *content; struct dict *ne......

holdbody
21分钟前
3
0
windows 查看 端口使用情况

资料 https://jingyan.baidu.com/article/3c48dd34491d47e10be358b8.html 统计端口连接数 netstat -an|find "8080" /c...

zaolonglei
22分钟前
2
0
OSG 屏幕空间环境光遮蔽(SSAO)讲义3 算法的核心

先介绍SSAO 接着介绍SSAO的核心算法 延迟着色法的采样 颜色采样 把像机的几个参数传入Shader SSAO渲染 建立SSAO摄像机 SSAO摄像机显示漫反射采样 先用上下像素点的方案, 再次讲原理. 换用RGB...

洛克人杰洛
42分钟前
2
0
聊聊rocketmq的AccessChannel

序 本文主要研究一下rocketmq的AccessChannel AccessChannel rocketmq-client-4.5.2-sources.jar!/org/apache/rocketmq/client/AccessChannel.java public enum AccessChannel { /** ......

go4it
昨天
8
0
自己实现 aop 和 spring aop

上文 说到,我们可以在 BeanPostProcessor 中对 bean 的初始化前化做手脚,当时也说了,我完全可以生成一个代理类丢回去。 代理类肯定要为用户做一些事情,不可能像学设计模式的时候创建个代...

sanri1993
昨天
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部