Global Lifetime Does Not Execute Task Lifetime #3150
Replies: 6 comments
-
@BlythMeister I didn't try this in Frosting, but I use Global lifetime & Task lifetime with Cake scripting all the time, and I would expect the behavior in Frosting to be the same as Cake scripting. What makes you expect that the sequence be the one that you mentioned?
This is not the sequence that I would expect (also not the sequence that is documented). The Global lifetime are outer tasks, so they wrap everything else.
Thus the sequence you should get (unless you found a bug in Frosting) should be:
|
Beta Was this translation helpful? Give feedback.
-
The reason I expected/wanted it is so I can include the logic to write TeamCity service message before and after the logic Whilst I could put that inside the global lifetime, this meant the default logging at the start is outside the teamcity block. I have actually now worked around this by not using global lifetime, and just had a task that runs at the start. So, in short. If this is how it's expected to work...then that's cool. I wonder if a "pre-run" and "post-run" on global lifetime setup and teardown would enable the custom logging for teamcity? |
Beta Was this translation helpful? Give feedback.
-
@BlythMeister just to check... have you seen the Cake.BuildSystems.Module? |
Beta Was this translation helpful? Give feedback.
-
@gep13 OH WOW!!! |
Beta Was this translation helpful? Give feedback.
-
@BlythMeister I have been reliably informed that you should be able to reference the Cake.BuildSystems.Module package as a normal package reference, and from there, you should be able to do:
when setting up the services for your Frosting project. |
Beta Was this translation helpful? Give feedback.
-
That's what I gathered. |
Beta Was this translation helpful? Give feedback.
-
What You Are Seeing?
Global Lifetime invocation does not trigger Task Lifetime
Net result, when setting progress blocks for TeamCity in Task Lifetimes (setup and teardown) these do not appear in TeamCity log for global setup/teardown
I have attempted to put the TeamCity block logging into my setup/teardown but the header does not get put into that block.
As an asside (pure observation) the logging of the titles for global setup/teardown are a different format to tasks.
What is Expected?
Execution order
Task Lifetime Setup
Global Lifetime Setup
Task Lifetime Teardown
.... OTHER TARGETS ....
Task Lifetime Setup
Global Lifetime Teardown
Task Lifetime Teardown
What version of Cake are you using?
V1 (With Fosting)
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
TeamCity
How Did You Get This To Happen? (Steps to Reproduce)
Simple setup with no targets, but a task and global lifetime.
Task Lifetime Setup has:
Task Lifetime Teardown has:
Setup/Teardown just logs
Output Log
Because the setup/teardown do not run the lifetime, the logging for setup/teardown is not collapsible in the TeamCity Log.
Beta Was this translation helpful? Give feedback.
All reactions