云客户?
免费开始>
在MyJFrog中升级>
云的新功能>





SMTP凭据集成用于发送管道事件的通知使用SMTP邮件。

创建集成

要添加此集成,请按照管理管道集成页面。

以下是创建此集成所需的信息:

  • 名字为集成选择一个友好的名称
  • 宿主——接收有效负载的端点
  • 港口——用来发送邮件的端口
  • 主机名——可选的电子邮件标识标签
  • 邮件发送者——可选发件人邮箱地址
  • Email认证用户——可选用户名,用于授权发送电子邮件
  • 邮箱认证密码——可选授权发送邮件的密码
  • 代理——可选的电子邮件服务器代理设置
  • 安全——可选的安全选项连接到电子邮件服务器
  • ignoreTLS——可选的TLS选项连接到电子邮件服务器而不使用TLS
页面内容

使用

SMTP凭证集成可以的步骤中直接添加集成部分。

send_notification效用函数可与a一起使用SMTP凭证集成以发送通知消息。

例子:

send_notification notifySMTP——body" build docker image 112.32.101.173:8081/docker-local/demo:$PIPELINE_NAME.$RUN_NUMBER"

默认环境变量

当你把这个积分加到一个步骤时,会自动提供一组环境变量。

环境变量

描述

int_ < integration-name > _name 集成的名称
int_ < integration-name > _host 端点接收有效负载
int_ < integration-name > _port 用于发送电子邮件的端口
int_ < integration-name > _hostname 电子邮件的标识标签
int_ < integration-name > _senderEmail 发件人邮箱地址
int_ < integration-name > _username 授权发送邮件的用户名
int_ < integration-name > _password 授权发送邮件的密码
int_ < integration-name > _proxy 邮件服务器的代理设置
int_ < integration-name > _secure 连接到电子邮件服务器的安全选项
int_ < integration-name > _ignoreTLS

TLS选项连接到电子邮件服务器,而无需使用TLS


例子

发送通知
-名称:smtp_pipe步骤:-名称:test_step_1类型:Bash配置:集成:-名称:notifySMTP #替换为您的SMTP凭据集成的友好名称执行:onSuccess: #替换'notifySMTP'与您的SMTP凭据集成的名称- send_notification notifySMTP——收件人"buildalerts@mycompany.com"——主题"构建成功"——主体"构建docker镜像112.32.101.123:8081/docker-local/demo:$PIPELINE_NAME。$RUN_NUMBER" onFailure: #替换'notifySMTP'与您的SMTP证书集成的名称- send_notification notifySMTP -收件人"buildalerts@mycompany.com" -主题"构建失败" -主体"失败的docker映像112.32.101.123:8081/docker-local/demo:$PIPELINE_NAME.$RUN_NUMBER"
  • 没有标签
版权所有©2023 JFrog Ltd.