Skip to content

chore(ci): add cnb build - #999

Merged
RSS1102 merged 48 commits into
developfrom
auto/build-apk-web-92f0
Aug 13, 2026
Merged

chore(ci): add cnb build#999
RSS1102 merged 48 commits into
developfrom
auto/build-apk-web-92f0

Conversation

@liweijie0812

@liweijie0812 liweijie0812 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

🤔 这个 PR 的性质是?

勾选规则:
1.只要有新增参数,就勾选”新特性提交“
2.只修改内部bug,未新增参数,才勾选”日常 bug 修复“
3.其他选项视具体改动判断

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

  • fix(组件名称): 处理问题或特性描述 ...

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 标题遵循 Conventional Commits 格式:type(scope): 修改描述scope 可填写组件、文档或 CI 模块。
    示例:fix(TBottomTabBar): 修复 iconText 模式底部溢出
  • “相关 Issue”处带上修复的 Issue 链接或无关联 Issue
  • 已添加对应的 Spec 链接,或已由 Review 确认本次改动无需 Spec
  • 相关文档已补充或无须补充

liweijie0812 and others added 22 commits August 13, 2026 00:05
flutter-web:3.32.0 does not exist on the registry (only 3.44.x tags are
available). The flutter-android:3.32.0 image does exist and can build
web, so use it for the web build with Flutter 3.32.0.
- Switch from ghcr.io to Docker Hub (gmeligio/flutter-*) images.
  ghcr.io/gmeligio/flutter-web and flutter-android do not publish
  the 3.32.0/3.38.10 plain version tags, causing 'manifest unknown'
  at the Prepare stage.
- flutter-android: use 3.32.0 and 3.38.10 (valid on Docker Hub).
- flutter-web: only publishes 3.44.x+, so consolidate the web build
  to a single gmeligio/flutter-web:3.44.9 job.
按用户要求,将 build web 流水线镜像切换为项目开发环境镜像
docker.cnb.cool/tencent/tdesign/default-dev-env:latest(自带 Flutter 3.32.0,与 .fvmrc 一致)。
…hip error

The flutter-android and default-dev-env images have the flutter SDK at
/home/flutter/sdks/flutter owned by a different user than the CI runner,
causing 'detected dubious ownership in repository' errors during
flutter pub get / build.

Add 'git config --global --add safe.directory /home/flutter/sdks/flutter'
at the start of each build stage.
The previous fix replaced 'services.gradle.org/distributions' with
'mirrors.cloud.tencent.com/gradle/distributions', which produces a 404
because the Tencent gradle mirror serves the zip directly under /gradle/
(without a /distributions path segment).

Correct URL: https://mirrors.cloud.tencent.com/gradle/gradle-8.11.1-all.zip (200 OK)
Wrong URL:   https://mirrors.cloud.tencent.com/gradle/distributions/gradle-8.11.1-all.zip (404)

Fix the sed replacement to drop the trailing /distributions so the wrapper
can download gradle-8.11.1-all.zip from the Tencent mirror.
- 抽取 git-safe-env、install-component、install-example、build-apk、build-web 公共片段
- 移除 4 个 pipeline 中冗余的 git config safe.directory 命令(env 已覆盖 *)
- 4 个 pipeline 的 env 与 install stage 统一复用,减少约 100 行重复代码
- PUB_HOSTED_URL: https://mirrors.tencent.com/dart-pub
- FLUTTER_STORAGE_BASE_URL: https://mirrors.tencent.com/flutter
- SDK_TEST_BASE_URL: https://mirrors.tencent.com/AndroidSDK/

加入公共 env 片段,覆盖所有 flutter apk/web 构建阶段
- init.gradle 增加 google / maven-central 镜像源
- init.gradle 增加 pluginManagement 配置
- 新增 gradle.properties 优化参数(parallel/caching/configureondemand)
- 将APK构建的CPU资源从16核提升至32核
- 移除Web构建的verbose日志输出
- 为Web构建(flutter 3.32.0)指定16核CPU资源

Generated-By: AI
将APK/Web构建的runner CPU数从8提升到16,并将Gradle JVM堆内存上限增至8192M,以加快构建速度并避免内存不足问题。

Generated-By: AI
@tencent-adm

tencent-adm commented Aug 13, 2026

Copy link
Copy Markdown
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 4 committers have signed the CLA.

✅ RSS1102
✅ liweijie0812
❌ CodeBuddy
❌ autofix-ci[bot]


CodeBuddy seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

SDK_TEST_BASE_URL is not an officially recognized environment
variable by Flutter/Dart/Android tooling, so it has no effect.
Android SDK paths are controlled via ANDROID_HOME/ANDROID_SDK_ROOT.
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

完成

Web Demo

APK 下载

RSS1102
RSS1102 previously approved these changes Aug 13, 2026
autofix-ci Bot and others added 20 commits August 13, 2026 07:14
…solution error

The settingsEvaluated block in init.gradle that appends maven repos to
pluginManagement.repositories conflicts with Flutter's settings.gradle
which already declares pluginManagement.repositories. Gradle 8.11+ (bundled
with Flutter latest) fails with:
  'Build was configured to prefer settings repositories over project
   repositories but repository maven was added by settings file'.

Only mirror allprojects (dependency) repositories; build plugins resolve
via the google/mavenCentral/gradlePluginPortal declared in settings.gradle.
简化 .build-apk 为直接执行 flutter build apk,移除 Gradle 发行版镜像、
JVM 堆内存、init.gradle(PREFER_PROJECT)及 gradle.properties 优化参数等
一系列 Gradle 定制修改。Generated-By: AI
@RSS1102 RSS1102 changed the title chore: add cnb ci chore(ci): add cnb build Aug 13, 2026
@RSS1102
RSS1102 merged commit 7b9b047 into develop Aug 13, 2026
12 of 13 checks passed
@RSS1102
RSS1102 deleted the auto/build-apk-web-92f0 branch August 13, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants