你好!我叫Dmitry,我是Avito CI / CD Speed团队的发布工程师。几年来,我和我的同事不仅负责与移动应用程序发行有关的一切,而且还负责所有事情。Aleksey Shpirko详细介绍了我们的“发行列车”以及我们如何到达那里。
但是我们并没有停滞不前,今天我们将尝试告诉您我们的CI / CD系统是如何从一组脚本和TeamCity构建版本演变为功能完善的移动发布服务的,该服务使您可以通过便捷的界面管理整个应用程序的发布过程。
一点背景
Avito移动应用程序是:
- 数十个产品团队。
- 每个平台20个以上的开发人员。
- 数千个UI测试。
- 数以万计的UNIT测试。
- 数十万行代码。
- Android每周发布。
- iOS每两周发布一次。
发布过程包括以下部分:
- 从开发中切下发布分支并将其标记在git中。
- 运行所有自动代码检查并运行各种测试。
- 构建候选版本。
- 将发布候选版本上传到AppStore / GooglePlay和构件的内部存储。
- 将必要的信息发送到监视系统。
- -.
- what's new QA .
- Jira- — , , QA -.
- -.
- .
- .
- 100% .
2019 TeamCity-. cron TeamCity-, 1-9.
, - . , - , «» . .
.
1. TeamCity
. . .
TeamCity , :
- .
- .
- .
- « ».
-1 , -3 1 4, -7 , . , . .
.
2.
, . — CI/CD team Testing team. CD — . Testing team - — , .
, , ( , Jira-, , ) . , , , .
. , . .
3.
, . : , , -. , , : -, , , . Slack-, (Jira, Slack), -. « 100%?», « ?», « ?», « ?».
, , , , .
, , CI CD .
, .
CD:
- git;
- git;
- CI-;
- (Jira-, Release Notes);
- ;
- ;
- .
CI:
- ;
- ;
- - ;
- .
, . TeamCity .
, , CI CD. CD CI- , . , «--» . CI CD, «».
— JSON-, CD CI-, CI.
CD , , CI . CI , «» CD. .
config.json:
{
"schema_version": 1,
"project": "avito",
"release_version": "777.5",
"output_descriptor": {
"path":"http://artifactory.ru/releases/avito_android/777.5_1/output.json",
"skip_upload": false
},
"deployments": [
{
"type": "google-play",
"artifact_type": "bundle",
"build_variant": "release",
"track": "beta"
}
]
}
CI-, «» 777.5, , , output_descriptor, «», .
output.json:
{
"schema_version": 1,
"teamcity_build_url": "https://tmct.ru/viewLog.html?buildId=17317583",
"build_number": "777",
"release_version": "777.5",
"git_branch": {
"name": "release-avito/777.5",
"commit_hash": "2c54c50c220bf91bc1a6ca10b34f53a540c80551"
},
"test_results": {
"report_id": "5f3e94fd23d67bf434e5c1b8",
"report_url": "https://
tests.avito.ru/report/AvitoAndroid/FunctionalTests/2c54c50c220bf91",
"report_coordinates": {
"plan_slug": "AvitoAndroid",
"job_slug": "FunctionalTests",
"run_id": "2c54c50c220bf91"
}
},
"artifacts": [
{
"type": "apk",
"name": "avito-777.5-777-release.apk",
"uri": "http://example.com/artifactory/android/avito/777.5-777/avito-777.5-777-release.apk",
"build_variant": "release"
},
]
}
CI .
Nupokati:
. , . «» - .
TeamCity CD .
?
- .
- , .
- .
- , .
- .
Nupokati — .
CD- Python .
CD- , CI, .
CD- — Release
.
, , :
:
, pipeline . , .
:
CI CD , . .
, « » , . , -. , .