diff --git a/pkg/cmd/deploy.go b/pkg/cmd/deploy.go index d68d940..de81b2a 100644 --- a/pkg/cmd/deploy.go +++ b/pkg/cmd/deploy.go @@ -79,16 +79,16 @@ func runDeploy( "Deploy", func(ctx context.Context, host config.Host) error { // Notify to Slack - if err := slackClient.SendText(ctx, host.Deploy.SlackChannel, + if err := slackClient.SendText(ctx, host.Deploy.SlackChannelId, fmt.Sprintf("*<%s> deploying to %s...*", conf.GitRevision, host.Host)); err != nil { return err } defer func() { if err != nil { - _ = slackClient.SendText(ctx, host.Deploy.SlackChannel, + _ = slackClient.SendText(ctx, host.Deploy.SlackChannelId, fmt.Sprintf("*<%s> deploy was failed to %s* :sob:", conf.GitRevision, host.Host)) } else { - _ = slackClient.SendText(ctx, host.Deploy.SlackChannel, + _ = slackClient.SendText(ctx, host.Deploy.SlackChannelId, fmt.Sprintf("*<%s> deploy was succeeded to %s* :laughing:", conf.GitRevision, host.Host)) } }() diff --git a/pkg/config/types.go b/pkg/config/types.go index 03ef148..3725de1 100644 --- a/pkg/config/types.go +++ b/pkg/config/types.go @@ -81,10 +81,10 @@ func (c Host) ListTarget() []DeployTarget { } type Deploy struct { - SlackChannel string `yaml:"slack_channel,omitempty"` - PreCommand string `yaml:"pre_command,omitempty"` - PostCommand string `yaml:"post_command,omitempty"` - Targets []DeployTarget `yaml:"targets,omitempty"` + SlackChannelId string `yaml:"slack_channel_id,omitempty"` + PreCommand string `yaml:"pre_command,omitempty"` + PostCommand string `yaml:"post_command,omitempty"` + Targets []DeployTarget `yaml:"targets,omitempty"` } type DeployTarget struct {