Iterating Through a List of Deployment Units Using an MSBuild Task in a GeneXus KB

61 views Asked by At

I'm looking to implement a feature in GeneXus that functions like a "Deploy All", similar to the "Build All" feature. The goal is to automate the process for a given Knowledge Base (KB) so that it generates a separate zip file (package) for each Deployment Unit. I want to achieve this without the need to manually specify the list of Deployment Units for each KB.

How can I create such a feature that automatically identifies all Deployment Units in a KB, generating individual zip files for each? Any guidance or code examples on automating this process would be highly appreciated.

// Pseudocode for Software Deployment Process

// Setting up the Knowledge Base Path, Version, and Environment Set KBPath, KBVersion, KBEnvironment

// Define the Deployment Target and other necessary variables Set DeployTarget, ...

// Initiating the MSBuild task Call MSBuild Task which includes:

  • Open the Knowledge Base (KB) once

  • For each DeploymentUnit in the KB:

    • Generate the MSBuild deployment project for each DeploymentUnit, named as DeploymentUnitName.gxdproj (including all dependencies)
  • End For

  • Iterate through all DeploymentUnitName.gxdproj files generated in previous step and execute them to generate the Package named DeploymentUnitName.zip

1

There are 1 answers

0
arinaldi On

We did something similar... not to deploy all the units, but to import all the xpz from a folder. In that case what we did was 'generate' an msbuild with the statements and then we executed it.

It's not that the msbuild loops through the xpz list, we loop through the xpz list and generate the necessary msbuild.

Maybe that will help you