我找不到简单的(IMHO)设置解决方案。
在我的iOS应用程序中,我使用Fastlane通过select t.*,
count(distinct devicename) over (partition by date, username) as running_total
from t;
命令运行测试。
这会生成一个非常有用的xpretty测试报告HTML文件。
我想在测试结束时发送松弛通知,并附带指向我生成的HTML测试结果文件的链接。我正在使用在minimac上安装了运行程序的Gitlab来运行我的CI管道。
到目前为止,我找不到此设置的解决方案。有人可以指出我正确的方向吗?
答案 0 :(得分:1)
我希望您在最近 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