http://www.cnblogs.com/yinghuochong/archive/2013/09/01/3294940.html

1.安装包,工具略过。

2.插件管理

This plugin adds the Subversion support (via SVNKit) to Jenkins.
This plugin will upload .ipa or .apk file(s) to testflightapp.com for distribution.
This plugin provides builders to build xcode projects, invoke agvtool and package .ipa files
This plug-in adds reusable macro expansion capability for other plug-ins to use.
This plugin provides a new enhanced API for interacting with SCM systems.
Integrates Jenkins with CVS version control system using a modified version of the Netbeans cvsclient.
This plugin integrates GIT with Jenkins.
 
3.新建项目开始配置步骤:

1>.源码管理 :SVN更新代码工程与资源 。

2>.构建触发器,可以不要 指定时间自己构建  Poll SCM  H 22 * * *  【每天22.00点自动构建一次】

3>.添加Execute Shell 步骤

cp $WORKSPACE/Tools/PostProcessBuildPlayer $WORKSPACE/code/Assets/Editor/
chmod +x $WORKSPACE/code/Assets/Editor/PostProcessBuildPlayer

rm -rf $WORKSPACE/build
mkdir -p $WORKSPACE/build

echo Start building Unity project to iOS project..........
/Applications/Unity/Unity.app/Contents/MacOS/Unity -projectPath $WORKSPACE/code -executeMethod PerformBuild.CommandLineBuild -batchmode -quit -logFile $WORKSPACE/build/log.txt

echo Copy resource to build directory.....
mkdir -p ${WORKSPACE}/build/iPhone/Data/ClientRes
cp -r ${WORKSPACE}/ClientRes/Config ${WORKSPACE}/build/iPhone/Data/ClientRes
cp -r ${WORKSPACE}/ClientRes/Assetbundles_Ios ${WORKSPACE}/build/iPhone/Data/ClientRes
rm -rf ${WORKSPACE}/build/iPhone/Data/ClientRes/Config/.svn
rm -rf ${WORKSPACE}/build/iPhone/Data/ClientRes/Assetbundles_Ios/.svn

python $WORKSPACE/Tools/updateInfo.py ${WORKSPACE}/build/iPhone 0.6 ${BUILD_NUMBER}

4>.Xcode 工程导出IPA。

5.

cd ${WORKSPACE}/build/distributes
mkdir -p DragonBone-0.6.${BUILD_NUMBER}
cp *.ipa DragonBone-0.6.${BUILD_NUMBER}\

# Generate .plist file for wireless app distribution
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>__URL__</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.cdkoi.dragon</string>
<key>bundle-version</key>
<string>dragon 0.6.${BUILD_NUMBER}</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Dragon Bone for iOS</string>
<key>subtitle</key>
<string>0.6.${BUILD_NUMBER}</string>
</dict>
</dict>
</array>
</dict>
</plist>" > "${WORKSPACE}/build/distributes/DragonBone-0.6.${BUILD_NUMBER}/app.plist";
cp -r ${WORKSPACE}/build/distributes/DragonBone-0.6.${BUILD_NUMBER} ~/distributes

 ===========updateInfo.py 内容===========

# -*- coding: utf-8 -*-
#!/usr/bin/python

import sys
import os

PRDUCT_NAME = "XXX"
CBundleIdentifier = "com.cdkoi.dragon"

def process_info(info_filename, product_name, bundle_version, build_version):
info_plist = open( info_filename, 'r' )
lines = info_plist.readlines()
info_plist.close()

info_plist = open( info_filename, 'w' )

# Now iterate through the project adding any new lines where needed
i = 0
stepOneLine = False
for i in range(0, len(lines)):
if stepOneLine == False:
line = lines[i]
info_plist.write(line)
stepOneLine = False

if line.strip() == "<key>CFBundleName</key>":
info_plist.write( "\t" + "<string>" + PRDUCT_NAME + "</string>" + '\n' )
stepOneLine = True

if line.strip() == "<key>CFBundleDisplayName</key>":
info_plist.write( "\t" + "<string>" + PRDUCT_NAME + "</string>" + '\n' )
stepOneLine = True

if line == '<key>CFBundleShortVersionString</key>':
info_plist.write( "<string>1.0</string>" + '\n' )
stepOneLine = True

if line == '<key>CFBundleVersion</key>':
info_plist.write( "<string>1.0</string>" + '\n' )
stepOneLine = True
else:
stepOneLine = False

info_plist.close()

# Script start
print "Starting Modify info.plist with the following arguments..."

i = 0
for args in sys.argv:
print str(i) +': ' + args
i += 1

# Check this is an iOS build before running
if len(sys.argv) == 4:

info_full_path_name = sys.argv[1] + '/info.plist'
process_info(info_full_path_name, "龙之骨", "1.0", "1.0")

Jenkins 搭建U3D自动发布 IOS的更多相关文章

  1. Jenkins 搭建U3D自动发布 Android

    工具 [u3d相关的PostProcessBuildPlayer,PerformBuild.cs] 1.Jenkins 开源包  Java -jar jenkins.war,参考链接 http://w ...

  2. Jenkins搭建.NET自动编译发布远程环境

    继上一篇文章Jenkins搭建.NET自动编译发布本地环境 发布到本地成功后,接下来配置发布到远程环境. Build配置——发布到远程 根据前面VS中发布项目,生成的CustomProfile2 来配 ...

  3. Jenkins搭建.NET自动编译发布本地环境

    最近在做一个团队项目的时候,用到了自动编译发布部署环境[也可以说是持续集成],于是顺便学习了下这个环境的搭建过程. 持续集成 持续集成是一种软件开发实践,即团队开发成员经常集成它们的工作,通常每个成员 ...

  4. Jenkins搭建.NET自动编译测试与发布环境

    本文地址: http://blog.csdn.net/wangjia184/article/details/18365553 操作系统Windows, 确保需要的.NET Framework已经安装 ...

  5. Windows2012中Jenkins搭建.NET自动编译测试与发布环境

    安装7Zip 下载地址: http://www.7-zip.org/a/7z1602-x64.exe 安装Git 下载地址:https://github.com/git-for-windows/git ...

  6. iOS自动化探索(九)使用Jenkins自动化打包并发布iOS App

    继前一篇: Mac环境下安装Jenkins Jenkins安装好后, 我们试着创建一个iOS自动打包并发布的任务 iOS App构建必须在MAC上面使用xcode进行,所以我们要安装下xcode集成插 ...

  7. Jenkins+Ansible+Gitlab自动发布/回滚Spring项目

    一.实现方法流程图 流程图如下:代码托管在本地GitLab上(为了复现整套流水线,我直接使用了GitHub,懒得再搭建GitLab),开发完成后提交代码到代码仓库,[自动]触发Jenkins进行持续集 ...

  8. 在docker中运行jenkins实现代码自动发布到测试服务器

    在docker中运行jenkins 用的镜像是apline版:lts-alpine,并设置正确的时区. docker run --name jenkins_master -d \ -p 8081:80 ...

  9. 持续集成 Jenkins +Gitlab + SSH 自动发布 HTML 代码

    目录 一.整体流程 二.Jenkins 配置 2.1.首先安装插件 2.2.配置目标服务器 2.3.创建 job 2.4.配置 gitlab 触发 三.改进 一.整体流程 二.Jenkins 配置 2 ...

随机推荐

  1. Linux 字符集转化

    命令行"iconv --list" 查看Linux操作系统支持的字符集 iconv_open 设置字符集转化 --iconv_t iconv_open(const char *to ...

  2. C++ c++初识

    //c++初识 #include<iostream> //包含c++标准头文件 //<iostream>和<iostream.h>格式不一样,前者没有后缀,实际上, ...

  3. OAF中的面包屑(breadcrumbs)始无法显示(转)

    原文地址:OAF中的面包屑(breadcrumbs)始无法显示 OAF中面包屑是一种重要的导航工具.可以提示用户抵达当前页面的路径,也可以方便的切换到之前的节点. 开始做面包屑开发的时候发现面包屑总是 ...

  4. Linux下如何查看tomcat是否启动

    在Linux系统下,重启Tomcat使用命令操作的! 首先,进入Tomcat下的bin目录 cd /usr/local/tomcat/bin 使用Tomcat关闭命令 ./shutdown.sh 查看 ...

  5. [CareerCup] 10.2 Data Structures for Large Social Network 大型社交网站的数据结构

    10.2 How would you design the data structures for a very large social network like Facebook or Linke ...

  6. 20145215实验四 Android开发基础

    20145215实验四 Android开发基础 实验内容 基于Android Studio开发简单的Android应用并部署测试; 了解Android组件.布局管理器的使用: 掌握Android中事件 ...

  7. Scala学习笔记(五):类和对象

    对象实例的变量组成了对象的内存映射 public是Scala的默认访问级别 Scala里方法参数的一个重要特征是它们都是val,不是var Scala不能定义静态成员 单例对象(singleton o ...

  8. 手把手教你Dojo入门

    如果仅仅是为了练习Dojo,或者进行测试,可以参考下面的步骤.下面的文件均是在Windows下测试 需要的工具 1 Tomcat服务器:下载地址 选择适合自己的机器型号,即可 2 Dojo的工具包:下 ...

  9. go语言的模板,text/template包

    go语言的模板,text/template包 定义 模板就是将一组文本嵌入另一组文本里 传入string--最简单的替换 package main import ( "os" &q ...

  10. HDU 5976 Detachment 打表找规律

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5976 Detachment Time Limit: 4000/2000 MS (Java/Other ...