I need an approval mechanism in my deployment in the following manner:
When a deployment is started, email a set of users or group with two links, one for approval, one for rejection. This should become a blocking step requiring manual intervention.
From there, the two scenarios
a. If approval link is clicked, then the deployment can continue, with the deployer being notified.
b. If rejection link is clicked, then the deployment is stopped/cancelled, with the deployer being notified.
I used these articles as a starting point, but am not seeing a way to connect the 2 together in the manner mentioned above:
At the moment, there is no explicit mechanism built into Octopus to handle accept/reject links.
That said, as Octopus is API first, everything you can do from the Octopus UI, you can do from your own code. You could easily throw together a basic web app that calls the Octopus API and approves or rejects the change. You can find a PowerShell script in our OctopusDeploy-Api repo that you could translate into your language of choice. The email would just contain the reject & approve links to your app.
Another approach you could use is to use Azure Functions or AWS Lambda in conjunction with subscriptions to send the email and handle the approve/reject links. Keep your eyes peeled - there is a blog post on how to use Azure Functions with Octopus that should go live today.
Thanks for the prompt response. That all makes and are good suggestions… though if I’m reading this correctly, there doesn’t seem to be a direct way from the project itself to send an email that has links that would directly handle the actions of taking responsibility and approving the release, correct?
If not, what is the prescribed you would recommend with what’s out of the box for this? I’m thinking something like:
Have a step to send a notification email with a link to the release.
Have a second step for Mnaual Intervention
The idea here being that when the release kicks, I get the email, click on the link to go the release, take ownership of the Manual Intervention step, and then Approve/Abort the release.