gpt4 book ai didi

gitlab-ci - 如何通过 FaSTLane 将测试报告附加到松弛通知

转载 作者:行者123 更新时间:2023-12-03 17:31:30 28 4
gpt4 key购买 nike

我找不到一个非常简单(恕我直言)设置的解决方案。

在我的 iOS 应用程序中,我使用 FaSTLane 通过 scan 运行测试命令。
这会生成一个非常有用的 xpretty 测试报告 HTML 文件。

我想在测试结束时发送一个 slack 通知,并附上指向我生成的 HTML 测试结果文件的链接。我正在使用安装在 minimac 上的带有运行器的 Gitlab 来运行我的 CI 管道。

到目前为止,我找不到此设置的解决方案。有人可以指出我正确的方向吗?

最佳答案

我希望您在最近 2 年内已经找到了解决方案。正如评论中所指出的,您可以使用 Slack 的 webhooks。然后你可以运行 slack在您的步骤中使用命令,例如 this :

platform :ios do
before_all do
ENV["SLACK_URL"] = "https://hooks.slack.com/services/T0A6LPW3A/B5B2SBA13/etc..."


desc "Tests, builds and uploads to iTunesConnect"
lane :appstore do

ENV["LANE_NAME"] = "Flicker"
ENV["BUNDLE_ID"] = "com.epri.fem"
ENV["SCHEME_NAME"] = ENV["LANE_NAME"]
ENV["TEAM_NAME"] = "Electric Power Research Institute"

runConfiguration()

end

def runConfiguration()

slack(
message: ENV["LANE_NAME"] + ") Incoming from branch " + sh("git rev-parse --abbrev-ref HEAD") + " - " + sh("git rev-parse HEAD"),
slack_url: ENV["SLACK_URL"]
)

sigh(team_name: ENV["TEAM_NAME"],
app_identifier: ENV["BUNDLE_ID"],
skip_certificate_verification: true) # Update Provisioing Profiles / Code Signing

slack(
message: "Finished updating provisioing profiles",
default_payloads: [],
slack_url: ENV["SLACK_URL"]
)

scan(
scheme: ENV["SCHEME_NAME"],
slack_url: ENV["SLACK_URL"]
) # run tests

gym(scheme: ENV["SCHEME_NAME"],
clean: true) # build the app

slack(
message: "Finished building app",
default_payloads: [],
slack_url: ENV["SLACK_URL"]
)

pilot(skip_submission: true,
team_name: ENV["TEAM_NAME"]) #upload to test flight

slack(
message: "Finished archiving and uploading to iTunesConnect",
default_payloads: [],
slack_url: ENV["SLACK_URL"]
)

end

error do |lane, exception|
slack(
message: exception.message,
default_payloads: [],
slack_url: ENV["SLACK_URL"]
)
end

关于gitlab-ci - 如何通过 FaSTLane 将测试报告附加到松弛通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53121436/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com