使用 WebHooks 默认负载的通知模板 (Appveyor)
Notification Templating with WebHooks default payload (Appveyor)
所以目前我正在设置通知,我想在消息部分发送的是 url 创建的工件 zip 文件。
我查看了默认负载 (https://www.appveyor.com/docs/notifications/#webhook-payload-default) 并能够发送 {{jobs}},它在电子邮件中给我这样的信息:
System.Collections.Generic.List`1[Appveyor.Models.BuildJobNotificationTemplateData]
我想我可以在我的消息传递模板中遍历它。然而,当我尝试这样做时,它总是用我尝试过的不同方法出错。
其中一些包括:
{{jobs[0].artifacts[0].url}}
{{jobs.artifacts.url}}
{{eventData.jobs.artifacts.url}}
{{eventData.jobs[0].artifacts[0].url}}
Etc…
使用模板引擎获取第一个工件 url 的正确语法是什么?
此语法有效(请参阅 mustache 模板以了解语法)
<p>Artifacts:</p>
<ul>
{{#jobs}}
{{#artifacts}}
<li>{{url}}</li>
{{/artifacts}}
{{/jobs}}
</ul>
但不幸的是,它会 return 临时 Azure blob 存储 URL,它将在 60 分钟后过期。请收看https://github.com/appveyor/ci/issues/1646. For now to get permanent URL please use this workaround
所以目前我正在设置通知,我想在消息部分发送的是 url 创建的工件 zip 文件。
我查看了默认负载 (https://www.appveyor.com/docs/notifications/#webhook-payload-default) 并能够发送 {{jobs}},它在电子邮件中给我这样的信息: System.Collections.Generic.List`1[Appveyor.Models.BuildJobNotificationTemplateData]
我想我可以在我的消息传递模板中遍历它。然而,当我尝试这样做时,它总是用我尝试过的不同方法出错。
其中一些包括:
{{jobs[0].artifacts[0].url}}
{{jobs.artifacts.url}}
{{eventData.jobs.artifacts.url}}
{{eventData.jobs[0].artifacts[0].url}}
Etc…
使用模板引擎获取第一个工件 url 的正确语法是什么?
此语法有效(请参阅 mustache 模板以了解语法)
<p>Artifacts:</p>
<ul>
{{#jobs}}
{{#artifacts}}
<li>{{url}}</li>
{{/artifacts}}
{{/jobs}}
</ul>
但不幸的是,它会 return 临时 Azure blob 存储 URL,它将在 60 分钟后过期。请收看https://github.com/appveyor/ci/issues/1646. For now to get permanent URL please use this workaround