headsnet/deploy-notify-bundle

发送 Symfony 应用部署通知

v0.1.11 2019-05-05 15:44 UTC

This package is auto-updated.

Last update: 2024-09-06 03:33:48 UTC


README

使用简单的控制台命令发送电子邮件通知给一个或多个收件人,该命令可以在您的部署过程中执行。

通知可以发送给一个或多个收件人,并且可以选择性地在电子邮件内容中包含应用程序变更日志文件。

安装

使用 Composer 安装

composer require headsnet/deployment-notification-bundle

将包添加到 AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Headsnet\DeployNotifyBundle\HeadsnetDeployNotifyBundle(),
    );
}

配置

app/config.yml 中添加所需的配置

headsnet_deploy_notify:
  app_name: My Application
  email:
    sender_email: app@domain.com
  recipients:
    - { name: Joe Bloggs, email: joe@email.com }
    - { name: John Smith, email: john@example.com }

您可以选择在电子邮件模板中包含变更日志文件。只需指定变更日志文件的名称

headsnet_deploy_notify:
  changelog:
    filename: CHANGES.md

.md 扩展名结尾的 Markdown 文件将自动解析为 HTML。

使用方法

只需从您选择的部署系统中执行控制台命令即可。

bin/console headsnet:deploy:notify

配置参考

headsnet_deploy_notify:
	app_name:                 ~  # Required
	email:
	    sender_email:         ~  # Required
	    sender_name:          '' # Optional
	    subject:              'Deployment Notification'
	changelog:
	    filename:             ~  # If specified, changelog contents will be included in email
	    path:                 /  # Default is project root dir
	    public_url:           ~  # Optionally add link to changelog in email
	recipients:
	    - { name: ~, email: ~ }
	    - { name: ~, email: ~ }

贡献

欢迎贡献。请通过拉取请求提交。