This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The following was based on the Cloudflare DNS plugin from Posh-Acme: | |
| # https://github.com/rmbolger/Posh-ACME/blob/master/Posh-ACME/DnsPlugins/Cloudflare.ps1 | |
| function Add-DnsTxtCloudflare { | |
| [CmdletBinding(DefaultParameterSetName='Email')] | |
| param( | |
| [Parameter(Mandatory,Position=0)] | |
| [string]$RecordName, | |
| [Parameter(Mandatory,Position=1)] | |
| [string]$TxtValue, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| Takes an Octopus certificate variable and | |
| 1) Writes it to a temporary file with a password (as Azure requires the PFX have a password) | |
| 2) Invokes New-AzureRmWebAppSSLBinding | |
| 3) Removes the temporary certificate file | |
| #> | |
| $ErrorActionPreference = 'Stop' | |
| Write-Verbose "Creating temporary certificate file" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ApprovalStepName = "Approve Deployment" | |
| $Deployer = $OctopusParameters["Octopus.Deployment.CreatedBy.Username"] | |
| $Approver = $OctopusParameters["Octopus.Action[$ApprovalStepName].Output.Manual.ResponsibleUser.Username"] | |
| Write-Host "Deployment created by $Deployer" | |
| Write-Host "Deployment approved by $Approver" | |
| if ($Deployer -eq $Approver) { | |
| Fail-Step "Approval cannot be given by the person performing the deployment" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.DirectoryServices.AccountManagement; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Security.Principal; | |
| using Octopus.Core.Model.Events; | |
| using Octopus.Core.Model.Users; | |
| using Octopus.Core.RelationalStorage; |