lametric

Powershell Invoke-RestMethod from VSTS build step fails with error 417

老子叫甜甜 提交于 2019-12-24 06:33:11
问题 We bought ourselves a Lametric clock (www.lametric.com) which supports displaying messages sent to it through a Web-API. We would like to integrate this into our CI/CD queue. For that we have written a Powershell script, which will send a specified notification. This script works fine, when executed locally. When executed from a (local) VSTS Build Agent, it fails with a status code 417. This is the powershell script: Param ( [Parameter(mandatory=$true)] [string] $BuildName, [Parameter

How to dismiss a Lametric Nofitication using powershell

夙愿已清 提交于 2019-12-11 16:13:42
问题 This is a followup question to this comment about dismissing a notification on the Lametric clock. We use the Lametric clock to display notifications whenever a build fails. So far, someone would need to get up and physically press the button on the Lametric clock to dismiss the notification again. How can this be solved using powershell? 回答1: To solve this, we first made a GET request to get a list of notifications IDs in the queue of the Lametric clock: $request = @{uri = 'http://192.168.37