I’m a newbie to Octopus, but I’m trying to help a project team because their DevOps guy quit. We have a deployment process which pushes code out to 100s of clients, but the package re-uploads everytime. I’m trying to establish a process where we check if the file exists on the server. If not, use Oct Transfer File to upload to the server.
Octopus Server: Windows
Deployment Server: Linux
I’m trying to echo anything package/deployment related, but everything I try doesn’t echo
#{Octopus.Release.Number}
#{Octopus.Release.Package[blah].Version}
#{package.PackageId}
and etc.
The only thing I can seem to get to echo back is #{Octopus.Release.Id}
Is this a chicken/egg issue or do I have something incorrectly configured? If I can get these details set, then I can write a script to do more robust work.
Thanks for reaching out, and welcome to the forum!
Looking at our documentation the Octopus.Release.Package variable is only populated if build information has been pushed for the specified package and is not accessible from the project deployment steps.
There is the Octopus.Deployment.PackageBuildInformationvariable that is available from the project deployment step and looks like it contains the information you’re looking for.
I hope this helps. Feel free to let me know if you have any other questions.
Thanks for the help, I think I can work with what you gave me. So Octopus.Deployment.PackageBuildInformation returns a key/value pair. How can I get a single value from this? I’ve tried the following: