Required daily octopus deployment

I want to deploy code using octopus on windows azure at Every Morning 9 am BST(Monday-Friday). Could anyone please help me?

Hi,

Thank you for reaching out! As you probably know already, our current Deployment Schedule feature only allows you to schedule a deployment for a single run.

It’s not possible currently to setup recurring scheduled deployments, but there is a UserVoice suggestion to add this functionality that could use some more votes!

Your best bet to do this right now would be to rely on the scheduling capabilities of your build server or even the windows Task Scheduler, and have those calling Octo.exe to create/deploy the release in Octopus.

Kind regards,

Kenny

Hi, I have created one azure power shell script. But getting some error. Please help me to resolve this.

Script:-
$var=./Octo.exe list-latestdeployments “–project=RM abc” --environment=dev-Production --server=http://localhost/ --apiKey=abc-abcd

#Write-Output $var

$versions=$var -match “Version: (.)"""
if ($versions.Length -gt 0 )
{
$rst= [regex]::matches($versions[0], "Version: (.
)”"")

$release= $rst[0].Groups[1].Value
#Write-Output $rst[0].Groups[1].Value
#Write-Output “Deployment Started”

./Octo.exe deploy-release “–project=RM abc” --releaseNumber=$release --deployto=dev-Production --server=http://localhost/ --apiKey=abc-abcd

#Write-Output “Deployment Completed”

}else
{
Write-Output “No release availabe to deploy”
}

Error:-
PS C:\OctoScheduler> .\QASS.ps1
1.2.3-release

Handshaking with Octopus server: http://localhost/
Handshake successful. Octopus version: 3.2.23; API version: 3.0.0
Authenticated as: “abc” ""
Finding project: RM abc
Finding release 1.2.3-release
Warning: there are no applicable machines roles used by step Slack Deployment step
Error from Octopus server (HTTP 400): There was a problem with your request.

  • There must be at least one enabled healthy machine to deploy to in the environment
    Once you have corrected these problems you can try again.
    If the problem is related to a variable you will need to update the variables for this release or recreate the releas
    e for the changes to take effect.
    If the problem is related to the deployment process you will need to create a new release for the changes to take eff
    ect.

Exit code: -7
Deployment Completed

Hi,

Thanks for getting in touch! Your script seems to be getting the information you need. What seems to be happening is it’s deploying a release but there are no enabled targets in the target environment for the deployment steps, as shown in your octo.exe output. You can also get this error if your Slack step isn’t scoped to the correct machine role. The best way to test this is to use the Octopus web portal to run this deployment and see if that works. The web portal should give you more information which will likely help you isolate the issue.

I hope that helps!

Kenny