1分钟快速使用Docker上手新版Sentry-CLI - 创建一个版本
2023-04-18 13:15:38 时间
本文转载自微信公众号「黑客下午茶」,作者为少。转载本文请联系黑客下午茶公众号。
我们可以使用官方 sentry-cli 工具操作 Sentry API,从而来为你的项目管理一些数据。它主要用于管理 iOS、Android 的调试信息文件,以及其他平台的版本(release)和源代码映射(source maps)管理。
安装
Docker 镜像
默认情况下,该命令在 /work 目录中运行。挂载相关的你的项目文件夹并在那里构建输出以允许 sentry-cli 扫描资源:
- # 拉取镜像
- docker pull getsentry/sentry-cli
- # 执行命令
- docker run --rm -v $(pwd):/work getsentry/sentry-cli --help
- # sentry-cli 1.68.0
- # Command line utility for Sentry.
- # This tool helps you manage remote resources on a Sentry server like
- # sourcemaps, debug symbols or releases. Use `--help` on the subcommands
- # to learn more about them.
- # USAGE:
- # sentry-cli <SUBCOMMAND>
- # OPTIONS:
- # --api-key <API_KEY>
- # The given Sentry API key.
- # --auth-token <AUTH_TOKEN>
- # Use the given Sentry auth token.
- # -h, --help
- # Print this help message.
- # --log-level <LOG_LEVEL>
- # Set the log output verbosity. [possible values: trace, debug, info, warn, error]
- # --url <URL>
- # Fully qualified URL to the Sentry server.
- # [defaults to https://sentry.io/]
- # -V, --version
- # Print version information.
- # SUBCOMMANDS:
- # bash-hook Prints out a bash script that does error handling.
- # difutil Locate or analyze debug information files.
- # help Prints this message or the help of the given subcommand(s)
- # info Print information about the Sentry server.
- # issues Manage issues in Sentry.
- # login Authenticate with the Sentry server.
- # projects Manage projects on Sentry.
- # react-native Upload build artifacts for react-native projects.
- # releases Manage releases on Sentry.
- # repos Manage repositories on Sentry.
- # send-event Send a manual event to Sentry.
- # upload-dif Upload debugging information files.
- # upload-proguard Upload ProGuard mapping files to a project.
配置和认证
配置文件
sentry-cli 工具可以使用名为 .sentryclirc 的配置文件以及环境变量和 .env 文件进行配置。从当前路径向上查找配置文件,并且始终加载 ~/.sentryclirc 中的默认值。您还可以从命令行参数覆盖这些设置。
.sentryclirc
- [auth]
- token=your-auth-token
- [defaults]
- org=sentry
- project=react-sentry-demo
- url=https://x.xxx.com
进入容器内
创建一个新版本:
- docker run --rm -it -v $(pwd):/work getsentry/sentry-cli /bin/sh
- sentry-cli releases new 1.0.0
Refs
https://docs.sentry.io/product/cli/
相关文章
- Linux 5.13 还原及修复明尼苏达大学的问题补丁
- 企业没有大数据,只有坏数据
- 微软改进 Edge 浏览器密码健康功能
- 来自Twitter的Hadoop优化经验:集群越大越明显!
- Mozilla 正在优化 Firefox 在 MacOS 上的使用体验
- 苹果 macOS Big Sur 11.4 解决大漏洞:黑客可利用该漏洞偷偷截屏、录屏
- Spark 和 Hadoop 是朋友不是敌人
- 4 款值得一试的 Linux 终端多路复用器
- 将Hadoop作为云托管服务的优劣势分析
- 容器是加速企业上云的一条捷径
- 如何优化正则表达式性能?
- 揭开Linux命令Bash history的神秘面纱
- 面向旧计算机的六种轻量级 Linux 桌面环境
- Teradata Loom显著提升数据湖可管理性和安全性
- Linux系统中编译、链接的基石-ELF文件:扒开它的层层外衣,从字节码的粒度来探索
- 抛弃 Autotools 向 CMake 迈进吧
- 大量用户报告 Chrome 浏览器意外崩溃,谷歌官方发布紧急修复
- 微软 Edge 浏览器的选词弹窗翻译功能将回归
- 你的老婆是怎么算出来的?揭秘佳缘用户推荐系统
- 破解迷雾:关于大数据与Hadoop的九大误区