1分钟快速使用Docker上手新版Sentry-CLI - 创建一个版本

云计算
我们可以使用官方 sentry-cli 工具操作 Sentry API,从而来为你的项目管理一些数据。它主要用于管理 iOS、Android 的调试信息文件,以及其他平台的版本(release)和源代码映射(source maps)管理。

 

 

本文转载自微信公众号「黑客下午茶」,作者为少。转载本文请联系黑客下午茶公众号。

我们可以使用官方 sentry-cli 工具操作 Sentry API,从而来为你的项目管理一些数据。它主要用于管理 iOS、Android 的调试信息文件,以及其他平台的版本(release)和源代码映射(source maps)管理。

安装

Docker 镜像

默认情况下,该命令在 /work 目录中运行。挂载相关的你的项目文件夹并在那里构建输出以允许 sentry-cli 扫描资源:

  1. # 拉取镜像 
  2. docker pull getsentry/sentry-cli 
  3. # 执行命令 
  4. docker run --rm -v $(pwd):/work getsentry/sentry-cli --help 
  5. # sentry-cli 1.68.0 
  6.  
  7. # Command line utility for Sentry. 
  8.  
  9. # This tool helps you manage remote resources on a Sentry server like 
  10. # sourcemaps, debug symbols or releases.  Use `--help` on the subcommands 
  11. to learn more about them. 
  12.  
  13. # USAGE: 
  14. #     sentry-cli <SUBCOMMAND> 
  15.  
  16. # OPTIONS: 
  17. #         --api-key <API_KEY> 
  18. #             The given Sentry API key
  19.  
  20. #         --auth-token <AUTH_TOKEN> 
  21. #             Use the given Sentry auth token. 
  22.  
  23. #     -h, --help 
  24. #             Print this help message. 
  25.  
  26. #         --log-level <LOG_LEVEL> 
  27. #             Set the log output verbosity. [possible values: trace, debug, info, warn, error] 
  28.  
  29. #         --url <URL> 
  30. #             Fully qualified URL to the Sentry server. 
  31. #             [defaults to https://sentry.io/] 
  32. #     -V, --version 
  33. #             Print version information. 
  34.  
  35.  
  36. # SUBCOMMANDS: 
  37. #     bash-hook          Prints out a bash script that does error handling. 
  38. #     difutil            Locate or analyze debug information files. 
  39. #     help               Prints this message or the help of the given subcommand(s) 
  40. #     info               Print information about the Sentry server. 
  41. #     issues             Manage issues in Sentry. 
  42. #     login              Authenticate with the Sentry server. 
  43. #     projects           Manage projects on Sentry. 
  44. #     react-native       Upload build artifacts for react-native projects. 
  45. #     releases           Manage releases on Sentry. 
  46. #     repos              Manage repositories on Sentry. 
  47. #     send-event         Send a manual event to Sentry. 
  48. #     upload-dif         Upload debugging information files. 
  49. #     upload-proguard    Upload ProGuard mapping files to a project. 

配置和认证

配置文件

sentry-cli 工具可以使用名为 .sentryclirc 的配置文件以及环境变量和 .env 文件进行配置。从当前路径向上查找配置文件,并且始终加载 ~/.sentryclirc 中的默认值。您还可以从命令行参数覆盖这些设置。

.sentryclirc

  1. [auth] 
  2. token=your-auth-token 
  3.  
  4. [defaults] 
  5. org=sentry 
  6. project=react-sentry-demo 
  7. url=https://x.xxx.com 

进入容器内

创建一个新版本:

  1. docker run --rm -it -v $(pwd):/work getsentry/sentry-cli /bin/sh 
  2.  
  3. sentry-cli releases new 1.0.0 

Refs

https://docs.sentry.io/product/cli/

 

责任编辑:武晓燕 来源: 黑客下午茶
相关推荐

2021-09-01 19:33:41

Source SentryDocker

2021-09-08 09:22:34

SentryCLIOS

2022-02-23 20:38:32

云原生集群Postgres

2020-11-06 08:54:43

Vue 3.0函数代码

2022-06-28 12:35:21

DockerPython

2021-01-27 18:15:01

Docker底层宿主机

2022-03-04 16:06:33

数据库HarmonyOS鸿蒙

2023-02-16 08:26:41

2013-08-12 17:27:53

远程控制软件

2020-10-14 11:31:41

Docker

2020-10-30 15:04:16

开发技能代码

2020-07-17 07:44:25

云计算边缘计算IT

2017-09-09 13:29:22

ARCoreAndroid移动设备

2013-06-27 09:41:19

LuaLua语言Lua语言快速入门

2023-09-11 08:25:57

PythonPyQt

2023-09-08 07:54:01

TkinterPython

2019-07-09 14:42:17

SQLexplain索引

2017-03-16 08:46:57

延时消息环形队列数据结构

2020-12-07 11:23:32

Scrapy爬虫Python

2021-03-23 15:35:36

Adam优化语言
点赞
收藏

51CTO技术栈公众号