is it possible to get current time values also from system variable? I only find the #{Octopus.Date.*} variables but it would be great to get the current time for versioning. Is it possible to do an Octopus.Time group with (hours, mintues, seconds)?
Or is there any way to configure the versioning to use the current time. When our CI creates a release (with octo.exe) the versioning pattern is 1.0.Date.Time (eg. 1.0.20151014.160432). But when we create a new release by hand i have to set the time part manually. Not a big deal but it would be better to fill it automatically.
At the moment there is no way to get the current time, you will need to do it manually.
I’ve added variables for retrieving the time, they should be out in Octopus 3.1.5.
The variables are for version templates. In project settings you should be able to enter #{Octopus.Time.Hour} into the version template field and when creating a new release it will resolve to the current hour.
I’ve tried in Octopus Server 3.1.5 and Hour, Minute and Second resolve as expected.
Ah, ok that makes sense now. I assumed they could be used anywhere. I was trying to use them for naming artifacts. I’ve worked round it with PowerShell.
Any chance to make these variables available in other places? In particular, trying to send out an automated email letting people know deployment will happen at Current.Time + 1 in the email text, I automated all our deployment process except the email.
Thanks for reaching out. The variables #{Octopus.time.hour}.#{Octopus.time.minute} & #{Octopus.time.second} are still available (see attached gif). Do keep in mind that they are only available for your project’s versioning template, and not like a regular variable during a deployment.
This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.