用jenkins生成android build.apk文件 [英] Generating android build with jenkins.Creating .apk files

查看:148
本文介绍了用jenkins生成android build.apk文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jenkins进行Mac上的android应用程序的持续集成.但是我无法使用Jenkins生成.apk文件,就像我们在iOS应用程序中创建.ipa一样.创建.apk文件以在其上分发的配置将是什么苹果机.

I am using Jenkins for continuous integration of android apps on mac.But i am unable to generate .apk file with Jenkins same as we create .ipa in iOS apps.what will be the configuration to create .apk file for distribution on mac.

推荐答案

您可以在jenkins中生成发布和调试版本.为此,请按照以下步骤操作.

You can generate both release and debug builds in jenkins. For that, please follow the below procedure.

  1. 通过单击任务/项目仪表板左侧面板中的配置按钮,启动任务/项目配置屏幕.
  2. 向下滚动以查看构建部分.
  3. 点击添加构建步骤" 按钮以查看下拉列表.
  4. 在其中单击调用Ant" 项目,并在附加的屏幕快照中进行同样的操作.
  5. 完成上述第4步后,通过单击保存"按钮来保存这些修改.
  6. 点击立即构建按钮,该按钮位于左上角的面板上.
  7. 现在,您已经在jenkins工作区中获得了构建.
    例如:就我而言,构建是在以下路径中生成的.
    C:\ Program Files(x86)\ Jenkins \ workspace \ JOB_NAME \ bin
  1. Launch the job/project configuration screen by clicking on configure button which is available left side panel of job/project dashboard.
  2. Scroll down to see the Build section.
  3. Click on "Add Build step" button to see the drop down list.
  4. Click on "Invoke Ant" item in that and do like same available in attached screen shot.
  5. Save these modifications by clicking on save button when you have completely done the 4th step above.
  6. Click on Build Now button which is available at top left side panel.
  7. Now you have got the builds in your jenkins workspace.
    Ex: In my case, builds are generated in the below path.
    C:\Program Files (x86)\Jenkins\workspace\JOB_NAME\bin

您还可以通过启用以下工件来在Job仪表板上查看构建.

You can also see the builds on Job dashboard by enabling the artifacts like below.

  1. 向下滚动以查看构建后操作部分.
  2. 点击添加构建后操作" 按钮以查看下拉列表.
  3. 单击归档工件" ,这将在后期构建操作"部分中添加一项.
  4. 提供需要在仪表板的工件"部分中显示的文件的路径和扩展名.
    例如:/bin/*.apk -显示该作业的bin文件夹中所有可用的apk文件.
  1. Scroll down to see the Post-build Actions section.
  2. Click on "Add post-build action" button to see the drop down list.
  3. Click on "Archive the artifacts", and this will add one item in Post build actions section.
  4. Give the path and extension of which files you need to display in artifacts section of dashboard.
    Ex: /bin/*.apk - to display all the apk files available in bin folder of that job.

这篇关于用jenkins生成android build.apk文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆