前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >1 分钟快速使用 Docker 上手最新版 Sentry-CLI - 创建一个版本

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

作者头像
为少
发布2021-09-17 09:54:23
6000
发布2021-09-17 09:54:23
举报
文章被收录于专栏:黑客下午茶黑客下午茶

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

安装

Docker 镜像

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

代码语言:javascript
复制
# 拉取镜像
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

代码语言:javascript
复制
[auth]
token=your-auth-token

[defaults]
org=sentry
project=react-sentry-demo
url=https://x.xxx.com

进入容器内

创建一个新版本:

代码语言:javascript
复制
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/
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2021-08-30,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 黑客下午茶 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装
    • Docker 镜像
    • 配置和认证
      • 配置文件
        • 进入容器内
        • Refs
        相关产品与服务
        容器镜像服务
        容器镜像服务(Tencent Container Registry,TCR)为您提供安全独享、高性能的容器镜像托管分发服务。您可同时在全球多个地域创建独享实例,以实现容器镜像的就近拉取,降低拉取时间,节约带宽成本。TCR 提供细颗粒度的权限管理及访问控制,保障您的数据安全。
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档