ios应用提交准备
Hello! Today I want to talk about the detailed configuration of automation of work with builds of iOS applications using Azure.
你好! 今天,我想谈一谈使用Azure构建iOS应用程序时工作自动化的详细配置。
What we can do with Azure Pipelines? Its supports Continuously build, test, and deploy to any platform and cloud.
我们可以使用Azure管道做什么? 它支持持续构建,测试和部署到任何平台和云。
He has a free tariff, which may be of interest to developers. It include: 1 Microsoft-hosted job with 1,800 minutes per month for CI/CD and 1 self-hosted job with unlimited minutes per month. What does that mean? You can simultaneously perform an operation on one of your projects and there is a 1800 minute limit on all your tasks (including unit test, build, deploy to AppStore).
他有免费的关税,开发者可能会对它感兴趣。 它包括:1个Microsoft托管的作业,每个月用于CI / CD的时间为1800分钟,以及1个自托管的作业,每月的时间不限。 那是什么意思? 您可以同时对一个项目执行操作,并且所有任务(包括单元测试,构建,部署到AppStore)的限制为1800分钟。
I will not tell how to register there and create my own project. I will tell you about setting up your project for Azure on the example of his two projects
我不会告诉您如何在此处注册并创建自己的项目。 我将以他的两个项目为例,向您介绍如何为Azure设置项目
When you connected your GutHub Project (you can connect private rep too) you must configure your configuration.
连接GutHub项目(也可以连接私人代表)时,必须配置您的配置。
第一个例子。 只需运行测试。 (First example. Just run tests.)
First create config file with name azure-pipelines.yml in the root of your repository
首先在存储库的根目录中创建名称为azure-pipelines.yml的配置文件
![Image for post](https://miro.medium.com/max/9999/1*IjIjQFKvfwbzeZGbOtV9OQ.png)
代理池 (Agent pool)
Then you need to select the appropriate agent pool. What it does mean? Because we set this for iOS app it need macOS environment. We can use specific macOS version:
然后,您需要选择适当的代理程序池。 这是什么意思? 因为我们为iOS应用设置了此设置,所以它需要macOS环境。 我们可以使用特定的macOS版本:
Or we can set latest macOS and it update version auto:
或者我们可以设置最新的macOS并自动更新版本:
Its support different OS: you can set ubuntu with ubuntu-latest or Windows Server 2019 windows-2019. You can read about this in this link
它支持不同的操作系统:您可以使用ubuntu-latest或 Windows Server 2019 Windows-2019设置ubuntu 。 您可以在此链接中阅读有关此内容的信息。
触发条件: (Triggers:)
Triggers its field for trigger your action. You can set various actions on your branches (include or exclude branches). I will not dwell on this topic, you can read about it here if you use GitHub. I personally use trigger on Master and develop branch:
触发其字段以触发您的操作。 您可以在分支上设置各种操作(包括或排除分支)。 我不会讨论这个主题, 如果您使用GitHub ,则可以在这里阅读。 我个人在Master上使用触发器并开发了分支:
动作: (Actions:)
As part of the first project, I will tell you how to run tests. Its really simple:
作为第一个项目的一部分,我将告诉您如何运行测试。 它真的很简单:
Steps? Its just array of your tasks (action with project).
脚步? 它只是您的任务阵列(与项目的操作)。
Actions — enter a space-delimited list of actions. Valid options are build
, clean
, test
, analyze
, and archive
.
动作 -输入以空格分隔的动作列表。 有效选项包括build
, clean
, test
, analyze
和archive
。
Scheme — valid scheme for your project. You can see this in Xcode
方案 -适用于您的项目的有效方案。 您可以在Xcode中看到
![Image for post](https://miro.medium.com/max/9999/1*RG7ZtZ4dbKjwG4GzwFhq3w.png)
sdk — available sdk for action (like build, test, etc). Now (22 May 2020) available iphoneos, iphonesimulator, macosx, appletvos, appletvsimulator, watchOS, watchsimulator. You can allways check this in your local Mac terminal with xcodebuild -showsdks:
sdk-可用于操作的sdk(例如构建,测试等)。 现在(2020年5月22日)可用iphoneos,iphonesimulator,macosx,appletvos,appletvsimulator,watchOS,watchsimulator。 您可以使用xcodebuild -showsdks在本地Mac终端中始终进行检查:
![Image for post](https://miro.medium.com/max/9999/1*2XWUW7wGnlZlXGpddRkLoQ.png)
![Image for post](https://miro.medium.com/max/9999/1*HGZd5Lo1ubB3E3Z8x4NkJg.png)
configuration — the Xcode project or workspace configuration to be built. You can see this in your Xcode project
配置 -要构建的Xcode项目或工作区配置。 您可以在Xcode项目中看到这一点
![Image for post](https://miro.medium.com/max/9999/1*HGZd5Lo1ubB3E3Z8x4NkJg.png)
xcWorkspacePath — relative path from the root of the repository to the Xcode workspace or project. You can use different Xcode project or workspace and use one main for Azure.
xcWorkspacePath —从存储库的根到Xcode工作区或项目的相对路径。 您可以使用不同的Xcode项目或工作区,并为Azure使用一个主要项目。
signingOption — method of signing the build. Available options are Do not code sign, Project defaults, manual and auto. Im used auto cause its just framework without sign.
signingOption —签署构建的方法。 可用选项包括“不编码符号”,“项目默认值”,“手动”和“ 自动”。 我用自动导致其公正的框架,没有迹象。
xcodeVersion — its really simple.
xcodeVersion —非常简单。
Anyway you can read about arguments in this link
无论如何,您都可以在此链接中了解参数
结论 (Conclusion)
And now its auto get your Pull Request from master and develop branches and run test.
现在,它会自动从master处获取您的Pull Request并开发分支并运行测试。
![Image for post](https://miro.medium.com/max/9999/1*qn671cdl0Dei5OXHnZDezA.png)
![Image for post](https://miro.medium.com/max/9999/1*IqrsofCLX7yTmo7X7pn5DA.png)
Initially, I wanted to write about both projects in one article, but it would be too big. In the next article I want to tell how to configure not just project unit tests, but also its build and delivery in the TestFlight. It will be really longread article without burning details from this article (like creating files, pool agent etc).
最初,我想在一篇文章中同时介绍这两个项目,但这太大了。 在下一篇文章中,我想讲述如何不仅配置项目单元测试,而且还配置它在TestFlight中的构建和交付。 这将是一篇非常长篇的文章,而不会涉及本文的详细信息(例如,创建文件,池代理等)。
You can contact with me: ToropkinD@gmail.com
您可以与我联系:ToropkinD@gmail.com
Check our simple log library for collect logs from your user: https://github.com/ESKARIA/AdvancedLogger.git
检查我们的简单日志库以从您的用户收集日志: https : //github.com/ESKARIA/AdvancedLogger.git
翻译自: https://medium.com/macoclock/prepare-your-ios-app-to-azure-pipelines-5c9c84f1b1fc
ios应用提交准备