diff --git a/BuildServer/lib/tasks/dotnetbuild.js b/BuildServer/lib/tasks/dotnetbuild.js index 76ef782..11fa086 100644 --- a/BuildServer/lib/tasks/dotnetbuild.js +++ b/BuildServer/lib/tasks/dotnetbuild.js @@ -3,44 +3,17 @@ var sequential = require('./sequential'); module.exports = function (params, processor) { - var tasks = []; - - if (!params.skipMbsCheckStyle) { - tasks.push({ - type: "dotnetcheckstyle", - params: params - }); - } - - tasks.push({ - type: "dotnetrewrite", - params: params - }); - - if (!params.skipNugetRestore) { - tasks.push({ - type: "dotnetnugetrestore", - params: params - }); - } - - tasks.push({ - type: "dotnetcompile", - params: { - solution: params.solution, - skipCodeSigning: params.skipCodeSigning, - forceCodeAnalysis: params.forceCodeAnalysis, - ignoreCodeAnalysis: params.ignoreCodeAnalysis, - configuration: params.configuration, - target: "Rebuild" - } - }); - - tasks.push({ - type: "cleanupafterdotnetbuild" - }); - return sequential({ - tasks: tasks + tasks: [ + { + type: "dotnetbuildwithoutcleanup", + name: "build", + params: params + }, + { + type: "cleanupafterdotnetbuild", + name: "cleanup" + } + ] }, processor); }; diff --git a/BuildServer/lib/tasks/dotnetbuildandtest.js b/BuildServer/lib/tasks/dotnetbuildandtest.js index 0729a0d..687ef74 100644 --- a/BuildServer/lib/tasks/dotnetbuildandtest.js +++ b/BuildServer/lib/tasks/dotnetbuildandtest.js @@ -7,7 +7,7 @@ module.exports = function (params, processor) { return sequential({ tasks: [ { - type: "dotnetbuild", + type: "dotnetbuildwithoutcleanup", name: "build", params: params }, @@ -15,6 +15,10 @@ module.exports = function (params, processor) { type: "dotnetnunitall", name: "test", params: params + }, + { + type: "cleanupafterdotnetbuild", + name: "cleanup" } ] }, processor); diff --git a/BuildServer/lib/tasks/dotnetbuildwithoutcleanup.js b/BuildServer/lib/tasks/dotnetbuildwithoutcleanup.js new file mode 100644 index 0000000..26065f6 --- /dev/null +++ b/BuildServer/lib/tasks/dotnetbuildwithoutcleanup.js @@ -0,0 +1,42 @@ +"use strict"; + +var sequential = require('./sequential'); + +module.exports = function (params, processor) { + var tasks = []; + + if (!params.skipMbsCheckStyle) { + tasks.push({ + type: "dotnetcheckstyle", + params: params + }); + } + + tasks.push({ + type: "dotnetrewrite", + params: params + }); + + if (!params.skipNugetRestore) { + tasks.push({ + type: "dotnetnugetrestore", + params: params + }); + } + + tasks.push({ + type: "dotnetcompile", + params: { + solution: params.solution, + skipCodeSigning: params.skipCodeSigning, + forceCodeAnalysis: params.forceCodeAnalysis, + ignoreCodeAnalysis: params.ignoreCodeAnalysis, + configuration: params.configuration, + target: "Rebuild" + } + }); + + return sequential({ + tasks: tasks + }, processor); +};