powershell 关于新App Veyor部署的HipChat通知
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 关于新App Veyor部署的HipChat通知相关的知识,希望对你有一定的参考价值。
[cmdletbinding()]
Param(
[Parameter(Position = 0,Mandatory = $True )]
[string]$apitoken,
[Parameter(Position = 1,Mandatory = $True )]
[string]$roomid
)
process {
$json="
{
`"color`": `"purple`",
`"message_format`": `"text`",
`"card`" : {
`"style`": `"application`",
`"format`": `"medium`",
`"url`" : `"https://ci.appveyor.com/project/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG`",
`"id`": `"$env:APPVEYOR_BUILD_ID`",
`"title`" : `"New Deployment`",
`"icon`": {
`"url`": `"http://softwaremanagementblog.net/wp-content/uploads/2015/05/icon_deployment-300x300.png`"
},
`"attributes`": [
{
`"label`": `"Application`",
`"value`": {
`"label`": `"$env:APPVEYOR_PROJECT_NAME`",
`"style`":`"lozenge-current`"
}
},
{
`"label`": `"Version`",
`"value`": {
`"label`": `"$env:APPVEYOR_BUILD_VERSION`",
`"style`":`"lozenge-success`"
}
},
{
`"label`": `"Commit`",
`"value`": {
`"label`": `"$env:APPVEYOR_REPO_COMMIT - $env:APPVEYOR_REPO_COMMIT_AUTHOR: $env:APPVEYOR_REPO_COMMIT_MESSAGE`"
}
}
]
},
`"message`": `"New deployment for $env:APPVEYOR_PROJECT_NAME`",
`"from`":`"Deployment`",
`"notify`":`"true`"
}
"
Invoke-WebRequest -Uri https://api.hipchat.com/v2/room/$roomid/notification?auth_token=$apitoken -Method Post -ContentType 'application/json' -Body $json
}
以上是关于powershell 关于新App Veyor部署的HipChat通知的主要内容,如果未能解决你的问题,请参考以下文章
powershell 安装sharepoint webpart:这个脚本1)备份当前部署的webpart,2)删除以前的webpart,3)添加新的wsp,4)dep
使用PowerShell部署sharepoint 2010计时器作业解决方案
使用 PowerShell 自动化 CloudServices 发布
使用 PowerShell 自动化 CloudServices 发布
如何使用 powershell 为新用户设置默认打印机
部署到 Azure Web App 后找不到 webjob?