If we wanted to use powershell to calculate the Release Schedule (Planned Start and End Datetimes) how would we go about doing that?
I've tried creating variables and then setting them as output variables on a task and I have another task to print them and that works as expected. When the stage completes I would like to create a new Change using the pre deployment Gates, however when I supply the variables I get an error does not contain a valid string representation of a date and time
Any advice would be appreciated
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The variable output from the gate is currently available to agentless jobs only. In order to access the variable on other jobs, you'll need to use RM REST APIs to update a release variable from the agentless job. We'll look to have an extension to do the same and help you.
@shashban thanks for the reply. Also is it possible to have this fail the stage? If you dont check the logs you wont know that there was an error.
@eugeneneimand Are you still blocked on this?
@shashban I too need a way to access and/or set variables from the gate in an agent based task. Your previous comment said you would look to have an extension to do this. Is that something that could be done quickly? If not, how can I use powershell or javascript based task to run in "agentless" or gate phase? Or are you saying that we can only use task types that use HttpRequest(Chain) execution in an agentless phase?
This should be available in 2-3 weeks from now, if not sooner.
Hi @shashban , are there any updates on this? I have other customers who are looking for this functionality. Thanks, Liam
@shashban any updates yet?
We found issues with the extension delaying the whole thing. Took us back to the drawing board. We're now re-targeting it in 2 weeks.
@shashban to confirm progress here...you commented 3 weeks ago indicating 2 weeks.
To fully understand, if we create a stage prior to the stage with a Service Now Gate, we can "calculate" the Planned Start (+4 hours) and End (+5 hours) date - using a Powershell script - so need to be an agent run job, not agent-less - wish the Powershell stage could run agent-less!!!
However setting these as a stage output variable, they will not be picked up in the subsequent stage gate, UNLESS we update the release variables in that release/stage via a REST request.
In the absence of the offered extension, please can you provide a sample (Powershell) scrip to achieve this?
@shashban - any updates?
@shashban - any updates? It has been like 6 months...
This issue hasn't been updated in more than 180 days, so we've closed it. If you feel the issue is still relevant and needs fixed, please reopen it and we'll take another look. We appreciate your feedback and apologize for any inconvenience.
@cxwtool thats historical
We open up an issue for the Microsoft development lead (@shashban) they no longer respond so you close it.
It’s still an unresolved issue. We have a hack work around but would prefer this be fixed. SN is a MS strategic partner right?
If a tree falls in the woods..comes to mind?
@acds For questions like these, please check out these resources: