Webhooks and variables

Hi,
I´d like to mark packages than have been deployed for an specific environment without adding additional steps to the deploy,emt process.
One idea is to use Subscriptions with a webhook, but i need to get the package name and version and set this on the header or URL call.

is that possible?

Hi @andrescolodrero,

Thanks for reaching out.

I know you said you would like to not add extra steps to the deployment, but do you think it would be okay to add a Post-Deployment script to your Deploy Package step(or one of the other steps) and do the work there?

Here is the method you do that if you arent familiar with it.



Please let me know if you think that would be an okay solution for you.

Best,
Jeremy

Hi,
thanks
i could do that, but i have several steps to add the function to tag the packages.
Probably the best step is when octopus adquire the packages, but it seem to be a system step.

Hi,

You’re very welcome.

You are correct, the acquire packages is a system step and you can’t add any scripts onto it.

You could choose one step(maybe the final one?) and iterate through the packages and do all of the work in one step like this:

#{each action in Octopus.Action}
    #{each package in action.Package}
        Write-Host "#{package.PackageId} #{package.PackageVersion}"
    #{/each}
#{/each}

Instead of write-hosting, you would do whatever logic you need for marking your packages.

Please let me know if you think that will work for you.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.