如何在Fastfile - Fastlane上添加带有Slack消息路径的附件图像

时间:2017-02-24 11:21:14

标签: ruby slack-api fastlane

我有一个 Fastfile ,它在每个通道后运行Slack消息。我试图在发送的每条消息上发布本地存储的图像,但它不适用于路径。 image_path也无效。

这是我的Slack消息

after_all do |lane|
    # This block is called, only if the executed lane was successful
    slack(
       message: "Successfully deployed new App Update, with attachment_properties",
       payload: {  # Optional, lets you specify any number of your own Slack attachments.
         "Build Date" => Time.new.to_s
       },
       attachment_properties: {
         image_url: "./fastlane/screenshot.jpg", #The poath the screenshot is stored
         fields: [{
           title: "Attachment",
           value: "Frameit Screenshots",
           short: true
           }]
       }
     )
  end

0 个答案:

没有答案