您的位置:首页 > 其它

Jenkins环境搭建&基础配置

2015-11-30 14:03 435 查看
环境:win7
安装包:jenkins-1.638.zip (下载地址:http://jenkins-ci.org/
默认安装-->访问地址: localhost:8080

安装插件
系统管理-->管理插件-->可选插件
过滤栏 输入 GitLab
自动安装:
点击直接安装
手动安装:
点击条目 下载.hpi文件
管理插件-->高级-->上传插件
选择文件 点击上传

系统设置
系统管理-->系统设置
勾选 Environment variables
键 ANDROID_NDK_ROOT
值 D:\android-ndk-r10d

键 ANDROID_SDK_BUILD_TOOLS
值 D:\adt-bundle-windows-x86_64-20140321\sdk\build-tools\android_4.4.2

键 ANDROID_SDK_ROOT
值 D:\adt-bundle-winodws-x86_64-20140321\sdk

键 JAVA_HOME
值 C:\Program Files\Java\jdk1.8.0_31

Git
Git installations
Name Default
Path to Git executable C:\Program Files (x86)\Git\bin\git.exe

Gitlab
Gitlab host URL http://gitlab.egret.com
API Token 5ATVJGUYyyfdkfuPyH_s

创建构建项目
新建-->Item名称-->输入 runtime-launcher-qe-->单选 构建一个自由风格的软件项目-->单击 OK

勾选 参数化构建过程
单击 添加参数-->String Parameter
名字 GIT_URL
默认值 git@gitlab.egret.com:runtime/runtime-launcher.git
描述 <font color="red">警告!除非必要,请不要修改此配置!修改该配置,要确保目标git库对liuyuan@egret.com有访问权限。</font>

名字 BRANCH_NAME
默认值 origin/channels/internal_v2.0
默认 <font color="red">警告!除非必要,请不要修改此配置!修改该配置,要确保目标branch对liuyuan@egret.com有访问权限。</font>

源码管理
单选 Git
Repository URL ${GIT_URL}

Credentials 单击Add
Kind SSH Username with private key
Username liuyuan@egret.com
Private Key 单选Enter directly-->粘贴私钥内容
单击 Add

Branches to build Branch Specifler(blank for 'any') ${BRANCH_NAME}

构建
添加构建步骤-->Invoke Ant
Ant Version ant-1.9.6-in-jenkins
Targets clean release
单击 高级
Build File EgretRuntimeLauncherInternal/build.xml
Propertles sdk.dir=D:\\adt-bundle-windows-x86_64-20140321\\sdk
key.store=D:\\adt-bundle-windows-x86_64-20140321\\cert.keystore
key.store.password=123456
key.alias=cert.keystore
key.alias.password=123456

构建后操作
添加构建后操作步骤-->Archive the artifacts
由于存档的文件 EgretRuntimeLauncherInternal/bin/*.apk

添加构建后操作步骤-->Record fingerprints of files to track usage
Files to fingerprint *
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: