|
| 1 | +{ |
| 2 | + "Steps": [ |
| 3 | + { |
| 4 | + "Id": "b3339d4f-563f-49ac-b759-554619554f9d", |
| 5 | + "Name": "Deploy", |
| 6 | + "RequiresPackagesToBeAcquired": false, |
| 7 | + "Properties": { |
| 8 | + "Octopus.Action.TargetRoles": "tentacle" |
| 9 | + }, |
| 10 | + "Condition": "Success", |
| 11 | + "Actions": [ |
| 12 | + { |
| 13 | + "Id": "f57466ee-18c3-4f89-9aa9-153814528a44", |
| 14 | + "Name": "Deploy", |
| 15 | + "ActionType": "Octopus.TentaclePackage", |
| 16 | + "Environments": [], |
| 17 | + "Properties": { |
| 18 | + "Octopus.Action.Package.NuGetFeedId": "feeds-1", |
| 19 | + "Octopus.Action.EnabledFeatures": "Octopus.Features.ConfigurationTransforms,Octopus.Features.ConfigurationVariables", |
| 20 | + "Octopus.Action.Package.AutomaticallyRunConfigurationTransformationFiles": "False", |
| 21 | + "Octopus.Action.Package.AutomaticallyUpdateAppSettingsAndConnectionStrings": "False", |
| 22 | + "Octopus.Action.Package.DownloadOnTentacle": "False", |
| 23 | + "Octopus.Action.Package.NuGetPackageId": "%PROJECT_NAME%.Deploy" |
| 24 | + }, |
| 25 | + "SensitiveProperties": {} |
| 26 | + } |
| 27 | + ], |
| 28 | + "SensitiveProperties": {} |
| 29 | + }, |
| 30 | + { |
| 31 | + "Id": "674e1a63-42cf-440e-83be-f80f58ef85a1", |
| 32 | + "Name": "Notify of draft", |
| 33 | + "RequiresPackagesToBeAcquired": false, |
| 34 | + "Properties": { |
| 35 | + "Octopus.Action.TargetRoles": "tentacle" |
| 36 | + }, |
| 37 | + "Condition": "Success", |
| 38 | + "Actions": [ |
| 39 | + { |
| 40 | + "Id": "578efb8c-8303-4c1f-88a9-f3cee9e14e0a", |
| 41 | + "Name": "Notify of draft", |
| 42 | + "ActionType": "Octopus.Script", |
| 43 | + "Environments": [ |
| 44 | + "Environments-65" |
| 45 | + ], |
| 46 | + "Properties": { |
| 47 | + "Octopus.Action.Script.ScriptBody": "$message = if ($OctopusParameters['HipChatMessage']) { $OctopusParameters['HipChatMessage'] } else { \"(successful) %PROJECT_NAME% [v$($OctopusParameters['Octopus.Release.Number'])] deployed to $($OctopusParameters['Octopus.Environment.Name']) on $($OctopusParameters['Octopus.Machine.Name'])\" } \n#---------\n$apitoken = $OctopusParameters['HipChatAuthToken']\n$roomid = $OctopusParameters['HipChatRoomId']\n$from = $OctopusParameters['HipChatFrom']\n$colour = $OctopusParameters['HipChatColor']\n\nTry \n{\n\t#Do the HTTP POST to HipChat\n\t$post = \"auth_token=$apitoken&room_id=$roomid&from=$from&color=$colour&message=$message¬ify=1&message_format=text\"\n\t$webRequest = [System.Net.WebRequest]::Create(\"https://api.hipchat.com/v1/rooms/message\")\n\t$webRequest.ContentType = \"application/x-www-form-urlencoded\"\n\t$postStr = [System.Text.Encoding]::UTF8.GetBytes($post)\n\t$webrequest.ContentLength = $postStr.Length\n\t$webRequest.Method = \"POST\"\n\t$requestStream = $webRequest.GetRequestStream()\n\t$requestStream.Write($postStr, 0,$postStr.length)\n\t$requestStream.Close()\n\t\n\t[System.Net.WebResponse] $resp = $webRequest.GetResponse();\n\t$rs = $resp.GetResponseStream();\n\t[System.IO.StreamReader] $sr = New-Object System.IO.StreamReader -argumentList $rs;\n\t$sr.ReadToEnd();\t\t\t\t\t\n}\ncatch [Exception] {\n\t\"Woah!, wasn't expecting to get this exception. `r`n $_.Exception.ToString()\"\n}", |
| 48 | + "Octopus.Action.Template.Id": "ActionTemplates-2", |
| 49 | + "Octopus.Action.Template.Version": "0", |
| 50 | + "HipChatFrom": "Octopus Deploy", |
| 51 | + "HipChatColor": "green", |
| 52 | + "HipChatRoomId": "#{HipChatEngineeringID}", |
| 53 | + "HipChatAuthToken": "#{HipChatAPIV1}", |
| 54 | + "HipChatMessage": "New draft release of %PROJECT_NAME% at https://github.com/Particular/%PROJECT_NAME%/releases" |
| 55 | + }, |
| 56 | + "SensitiveProperties": {} |
| 57 | + } |
| 58 | + ], |
| 59 | + "SensitiveProperties": {} |
| 60 | + }, |
| 61 | + { |
| 62 | + "Id": "b6145394-b751-4d2e-8a92-1b82f1a3fc9a", |
| 63 | + "Name": "Verify draft", |
| 64 | + "RequiresPackagesToBeAcquired": false, |
| 65 | + "Properties": { |
| 66 | + "Octopus.Action.TargetRoles": "" |
| 67 | + }, |
| 68 | + "Condition": "Success", |
| 69 | + "Actions": [ |
| 70 | + { |
| 71 | + "Id": "737fa883-457b-4821-805a-ade60e58e181", |
| 72 | + "Name": "Verify draft", |
| 73 | + "ActionType": "Octopus.Manual", |
| 74 | + "Environments": [ |
| 75 | + "Environments-65" |
| 76 | + ], |
| 77 | + "Properties": { |
| 78 | + "Octopus.Action.Manual.ResponsibleTeamIds": "teams-everyone", |
| 79 | + "Octopus.Action.Manual.Instructions": "Please verify the draft release notes of %PROJECT_NAME% at https://github.com/Particular/%PROJECT_NAME%/releases" |
| 80 | + }, |
| 81 | + "SensitiveProperties": {} |
| 82 | + } |
| 83 | + ], |
| 84 | + "SensitiveProperties": {} |
| 85 | + } |
| 86 | + ], |
| 87 | + "Version" : "%VERSION%" |
| 88 | +} |
0 commit comments