本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
进行持续的现代化改造
来源管理
使用atx ct source命令连接存储库。支持的提供商: GitHub、 GitLab、Bitbucket、本地。
GitHub 组织
令牌:带repo范围的个人访问令牌(经典)。 Read-only 为了进行分析,请使用完整存储库进行修复。
atx ct source add --namename--provider github --orgorg--tokenpat
GitLab 群组和用户
令牌:带api范围的个人访问令牌。
atx ct source add --namename--provider gitlab --orggroup-or-user--tokenpat# Self-hosted: atx ct source add --namename--provider gitlab --orggroup-or-user--tokenpat--url https://gitlab.example.com
Bitbucket 工作空间和项目
Bitbucket Cloud — 范围:read:repository:bitbucket、write:repository:bitbucket、read:pullrequest:bitbucket、write:pullrequest:bitbucket。还需要--email和--username。
atx ct source add --namename--provider bitbucket --orgworkspace--tokenapi-token--emailusername
Bitbucket 数据中心:
atx ct source add --namename--provider bitbucket --orgproject-key--tokenhttp-access-token--url https://bitbucket.example.com
本地存储库
atx ct source add --namename--provider local --pathparent-directory
重要
--path必须指向包含 git 存储库作为子目录的父目录,而不是指向单个存储库。
管理来源
atx ct source list atx ct source remove --namename
存储库发现和管理
atx ct discovery scan --sourcenameatx ct discovery status --sourcenameatx ct discovery scan --sourcename--pathnew-directory
发现后:
atx ct repository list atx ct repository list --sourcenameatx ct repository list --labels "team:frontend,priority:high" atx ct repository update --sourcename--repo "source::slug" --labels "team:frontend,priority:high" atx ct repository update --sourcename--labels "migration:wave-1"
跑步分析
该--type标志指定要运行的分析类型:
rapid-techdebt-analysis— 过时的依赖关系和轻松的胜利。tech-debt-comprehensive— 更深入的 AI-powered 分析,涵盖依赖关系、安全性、模式、性能、可维护性、架构、代码质量和基础架构发现。security— 安全漏洞和风险敞口。agentic-readiness— 您的存储库已准备就绪,可供人工智能代理(框架、API、文档)使用。modernization-readiness— 基础架构、应用程序、数据、安全和运营方面的现代化机会。
atx ct analysis run --typetype--sourcename[--reposource::slug] [--wait] atx ct analysis get --idid--json atx ct analysis list --json atx ct analysis list --statuspending|running|complete|cancelled|failed--json atx ct analysis list --typetype--json atx ct analysis cancel --ididatx ct analysis delete --idid[--cascade-findings]
自定义分析
atx ct analysis run --type custom --transformation-namename--sourcesource--reposource::slug--wait
带-g标志的配置:键值、JSON 或文件路径。
列出 TD:atx custom def list
管理调查发现
atx ct findings list --json atx ct findings list --reposource::slug--sourcename--severityhigh|medium|low--typeanalysis-type--statusopen|dismissed|obsolete--analysis-idid--fix-transformtransform-name--json
查找状态
open— 活跃dismissed— 手动解雇(需要原因)obsolete— System-set 当重新分析不再得出发现结果时
atx ct findings update --idid--status dismissed --reason "reason" atx ct findings update --idid--status open atx ct findings batch-update --idsid1,id2--status dismissed --reason "reason" atx ct findings get --ididatx ct findings delete --idid
寻找过时产品
Re-analysis 将已解决的发现标记为已过时。无法重新打开。保留以供审计。
创建补救措施
三种模式:基于发现、TD 覆盖、直接 TD。
atx ct remediation create --idsid1,id2--name "name" atx ct remediation create --idsid1,id2--transformation-nameTDatx ct remediation create --transformation-nameTD--reposource::slug
按提供商划分的输出: GitHub PR、 GitLab MR、Bitbucket PR、Local 分支
注意
令牌必须具有写入权限才能 PR/MR 创建。
带--local标志的本地执行。
atx ct remediation create --transformation-nameTD--reposource::slug-g "additionalPlanContext=Upgrade to Node.js 22" atx ct remediation list atx ct remediation status --ididatx ct remediation retry --ididatx ct remediation delete --idid
AWS 转换 Web 应用程序(可选)
Trans AWS form Web 应用程序是一个可选界面,用于监控整个代码源组合中的持续现代化分析、发现和修复。
在使用 Tr AWS ansform Web 应用程序之前,您需要启用用户身份才能在组织中访问 T AWS ransform。有关启用 AWS 转换的信息,请参阅设置 AWS 转换。
要使用 AWS 转换 Web 应用程序,请执行以下操作:
使用 AWS IAM 身份中心证书访问
https://aws.amazon.com/transform/并登录。如果登录后未出现持续现代化,请改用 IAM 凭证登录。要启用 IAM 证书登录,请执行以下操作:
在 AWS 管理控制台中,打开 “ AWS 转换”,然后选择 “设置”。
在 “使用 IAM 凭证进行访问 AWS 转换” 部分中,启用 IAM 凭证访问权限。
在同一设置页面上,复制 Web 应用程序 URL(使用 IAM)下方显示的登录链接。
将登录 URL 粘贴到打开 AWS 管理控制台的同一浏览器窗口中。这样可以确保 Web 应用程序使用该账户的 AWS 凭证。
打开左侧导航菜单并选择持续现代化。控制面板显示摘要统计信息,包括来源、存储库、按严重性划分的发现总数以及分析类型。
使用 “分析”、“发现结果” 和 “修复” 选项卡查看详细结果。
直接通过 Web 应用程序与 T AWS ransform 聊天,询问有关您的分析、发现或补救措施的问题。
Web 应用程序专为企业级运营而设计,在这些运营中,您需要集中查看跨多个代码库的持续现代化分析和修复。