6

We've recently downloaded and are hosting an on-premises Visual Studio Team Services build agent for our source code and have noticed that it's doing an extra step in the build process compared to our hosted agent. This extra step is the 'Post Job Cleanup' as seen below:

enter image description here

When setting up this agent locally there was no options for setting this, and looking at our build steps this extra job isn't listed there:

enter image description here

I've checked online guides but there's been no hint as to where this extra step is coming from. Does anyone know where the option is to include/exclude this for builds is?

Novastorm
  • 1,439
  • 3
  • 26
  • 40
  • Post Job Cleanup task should be also executed in Hosted Build Agent, can you check this? And why do you want to disable this step? – Eddie Chen - MSFT Feb 07 '17 at 00:53
  • 1
    I would like to be able to remove this step sometimes as well so I can have a look at the build output whilst debugging builds when I can't get the "Copy and Publish Build Artifact" steps to work – Aran Mulholland Feb 13 '17 at 12:03
  • @AranMulholland You can't log on Hosted Agent to check build output, all the source file and output will be cleaned after build, in order to save the machine resource. You can check the build log for build details. – starian chen-MSFT Feb 14 '17 at 01:43
  • 1
    Yeah but if you have a private build agent you can. – Aran Mulholland Feb 14 '17 at 01:44

2 Answers2

1

Setting process.clean to false in the variables of the release pipeline stops the "finalize job" step from killing all processes.

Setting variables in the release pipeline

https://developercommunity.visualstudio.com/solutions/498153/view.html

Gradle Daemon being killed in "Finalize Job" step

Zosoabi
  • 51
  • 5
  • Can you add some of the information from the links to the answer? That would make it much more helpful on SO. – Druckles Aug 20 '19 at 14:21
-1

They are the built-in steps and there isn’t the way to remove them (Get source, Post Job Cleanup) in VSTS, you don’t need to worry it, it won’t affect your project or build.

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
  • We were able to resolve this by reusing the installation files for our pre-existing agent (this didn't have the Post Job Cleanup). I think the newer agents which MS make available for download have this step pre-configured, but as of yet we haven't found where this is set. The Post Job Cleanup was really increasing our build time which became a blocker when a lot of devs were doing check-ins – Novastorm Feb 02 '17 at 09:24
  • @Novastorm There isn't the way to remove it if you are using Hosted build agent. If it takes a lot time, you need to use on premise build agent instead. – starian chen-MSFT Feb 02 '17 at 10:08
  • The above was an on premise one, sorry should have mentioned in my original post. – Novastorm Feb 02 '17 at 10:23
  • @Novastorm I knew what you mean in original post, the on premise build agent is required for your requirement – starian chen-MSFT Feb 03 '17 at 02:14
  • @Novastorm Regarding Hosted Build agent, it must to clear something that build used or generated, so Post Job Cleanup is required. – starian chen-MSFT Feb 06 '17 at 04:38