Bruce Foust

My feedback

  1. 3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  General  ·  Flag idea as inappropriate…  ·  Admin →
    Bruce Foust supported this idea  · 
  2. 22 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  General » Deployment features  ·  Flag idea as inappropriate…  ·  Admin →
    Bruce Foust commented  · 

    I also had a need to stagger server deployments. I had to add a powershell wait step with the following code. (I don't remember where I pulled the example to give credit for the script.)

    $seconds is the only parameter passed into the step for the initial wait.

    if (($OctopusParameters['Octopus.Machine.Name'] -eq "SERVER3") -or ($OctopusParameters['Octopus.Machine.Name'] -eq "SERVER1T"))
    {
    [int]$Wait = [convert]::ToInt32($Seconds, 10) + 30
    }
    elseif ($OctopusParameters['Octopus.Machine.Name'] -eq "SERVER4")
    {
    [int]$Wait = [convert]::ToInt32($Seconds, 10) + 60
    }
    elseif ($OctopusParameters['Octopus.Machine.Name'] -eq "SERVER6")
    {
    [int]$Wait = [convert]::ToInt32($Seconds, 10) + 90
    }
    else
    {
    [int]$Wait = [convert]::ToInt32($Seconds, 10)
    }

    Write-Host "Waiting for $Wait Seconds."
    $Increment = 4
    $retries = $Wait / $Increment
    $counter = 1

    # Wait
    if ($Wait -gt 0)
    {
    for($i=$Increment; $i -gt 0; $i--)
    {
    if ($Wait%$Increment -ne 0)
    {
    $tmp = "{0:N2}" -f ($retries * $i)
    }
    else
    {
    $tmp = $retries * $i
    }
    Write-Host "Time Remaining: $tmp seconds"
    Start-Sleep $retries
    }
    }

    Bruce Foust supported this idea  · 
  3. 8 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  General » Setup/administration  ·  Flag idea as inappropriate…  ·  Admin →
    Bruce Foust supported this idea  · 
  4. 1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  General » Deployment features  ·  Flag idea as inappropriate…  ·  Admin →
    Bruce Foust shared this idea  · 

Feedback and Knowledge Base