I've got my Pipeline tasks as follows:
(key one is Signing and aligning APK file(s)
one).
When I am looking at logs of the build(s), apart from the Signing and aligning APK file(s)
task logs there I also see Pre-job: Signing and aligning APK file(s)
one and Post-job: ...
ones (same as for Checkout
).
However, I don't quite understand what those tasks are and how it appeared I have them in logs? I can't find any documentation related to that. And, correspondingly, considering there are the "Pre-job" tasks, if there is any way to define my own tasks executing before the Pipeline build starts?
A task can define pre- and post- steps. These will be added to the initialization phase of the job and to the cleanup stage. In the case of the signing task I can imagine it helps ensure the secrets are properly cleaned up when the job is finished.
Especially on a shared agent this can be important, because not cleaning up after the fact may lead to the secrets staying around on the agent and potential "capture" by other jobs running on the same machine.
You can dig into what these jobs do exactly by looking at the sources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With