I setup TFS 2017 to build and deploy my app using Octo. I used the Octo created tasks in TFS to package, publish the packages to octo and create/deply the app. Everything works really good. Now I’d like to have it do this but instead of deploying the app immediately I’d like it to schedule the deployment. I can get it to work by adding the “deployAt” option to the “Create Octopus Release” task. But, the problem is I can only seem to put a static datetime in. I’d like this to take the current date and add one day to it. Is there a way to do this?
Hi Dan, thanks for getting in touch.
You are not limited to static dates for the argument as you can use variables as provided by VSTS/TFS. I don’t think the fields themselves support expressions, but you can definitely create the variable as part of another step.
You should be able to set the output variable using something like the following:
Write-Host "##vso[task.setvariable variable=releaseDate]$releaseDate"
You can then user the variable in the additional arguments field of the Octopus create release task similar to any other variable:
Hope that helps!
This worked perfectly for what I needed to do. Thank you for the help, I appreciate it!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.