Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to perform simple calculations in variable replacement #8096

Closed
3 tasks done
mjhilton opened this issue Mar 21, 2023 · 2 comments
Closed
3 tasks done

Ability to perform simple calculations in variable replacement #8096

mjhilton opened this issue Mar 21, 2023 · 2 comments
Assignees
Labels
kind/enhancement This issue represents an enhancement we are committed to adding to Octopus as some time

Comments

@mjhilton
Copy link

Prerequisites

  • I have searched open and closed issues to make sure it isn't already requested
  • My team has started working on this issue
  • I have written a descriptive issue title

The enhancement

The Need

In many situations it's useful to be able to do simple arithmetic in variable substitutions, for example:

We have a project variable "IP.Prefix" (e.g. 192.168.0) and a tenant variable "IP.Suffix" (e.g. 5) and they will be appended. However it would be easier for us to just have an "IP" project variable (e.g. 192.168.0.#{calc 10 + IP.Offset}) and a "IP.Offset" variable in the tenants. (source)

Solution

Upgrade Octostache to understand a small number of arithmetic operators.

@mjhilton mjhilton added the kind/enhancement This issue represents an enhancement we are committed to adding to Octopus as some time label Mar 21, 2023
@mjhilton mjhilton self-assigned this Mar 21, 2023
@octoreleasebot
Copy link

Release Note: Added ability to perform simple calculations in Variable Substitution

@Octobob
Copy link
Member

Octobob commented May 19, 2023

🎉 The fix for this issue has been released in:

Release stream Release
2023.2 2023.2.3830
2023.3+ all releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This issue represents an enhancement we are committed to adding to Octopus as some time
Projects
None yet
Development

No branches or pull requests

3 participants