Skip to content

Commit

Permalink
WEBITOOLS-192: updated documentation and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leon2Meudon92 committed Jul 24, 2023
1 parent 9438ffa commit 3d4ac45
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
14 changes: 10 additions & 4 deletions aip-console-jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ The Add Version step provides the following parameters :
technologies JEE and DOTNET as well.<u>Has no effect if `Rescan` is checked</u>.
* *Enable Data Safety Investigation*: Enables the data safety investigation
objective for the version.
* *Module Generation Type*: How the module generation will be handled by AIP Console. Either "Full Content" (default), "
* *Module Generation Type*: How the module generation will be handled by AIP Console. Either "Preserve Configured" (
default), or '"Full Content", "
Analysis Unit module" or "Technology Module".
* **NOTE** Use Preserve Configured option to keep your existing module generation type unchanged.

Under `Advanced Settings` you will find the following parameters :

Expand Down Expand Up @@ -334,11 +336,15 @@ Under `Advanced Settings` you will find the following parameters :
The Analyze step provides the following parameters :

* *Application Name* (**required**): The name of the application for which the analysis will be run.
* *Version Name*: The name of the version to Analyze. <u>If left blank</u>, the analyzed version will <u>be the latest Delivered Version</u>. If no new Delivered Version Exists, <u>it will use the Current Version</u>.
* *Version Name*: The name of the version to Analyze. <u>If left blank</u>, the analyzed version will <u>be the latest
Delivered Version</u>. If no new Delivered Version Exists, <u>it will use the Current Version</u>.
* *Snapshot*: Whether Snapshots should be created after Analysis.
* *Publish to Imaging*: Publish to Imaging if Imaging is configured with AIP Console
* *Publish to the Health Dashboard* : When checked, consolidates snapshots and publishes data to the Health Dashboards. Checked by default.
* *Module Generation Type*: How the module generation will be handled by AIP Console. Either "Full Content" (default), "Analysis Unit module" or "Technology Module".
* *Publish to the Health Dashboard* : When checked, consolidates snapshots and publishes data to the Health Dashboards.
Checked by default.
* *Module Generation Type*: How the module generation will be handled by AIP Console. Either "Preserve Configured" (
default), or '"Full Content", "Analysis Unit module" or "Technology Module".
* **NOTE** Use Preserve Configured option to keep your existing module generation type unchanged..

Under `Advanced Settings` you will find the following parameters :

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class AddVersionBuilder extends BaseActionBuilder implements SimpleBuildS
@Nullable
private String snapshotName = "";

private String moduleGenerationType = ModuleGenerationType.FULL_CONTENT.toString();
private String moduleGenerationType;

@DataBoundConstructor
public AddVersionBuilder(String applicationName, String filePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</f:entry>
<f:entry title="${%moduleGenerationType}" description="${%moduleGenerationType.descr}">
<select name="moduleGenerationType" field="moduleGenerationType">
<option value="preserve_configured">Preserve configured</option>
<option value="full_content">Full content</option>
<option value="one_per_au">Analysis unit module</option>
<option value="one_per_techno">Technology module</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void testAddVersionStepToJob() throws Exception {
AddVersionBuilder job = new AddVersionBuilder(BaseBuilderTest.TEST_APP_NAME, BaseBuilderTest.TEST_ARCHIVE_NAME);
job.setDomainName("");
job.setCssServerName("");
job.setModuleGenerationType(ModuleGenerationType.FULL_CONTENT.toString());
job.setModuleGenerationType(ModuleGenerationType.PRESERVE_CONFIGURED.toString());
jenkins.assertEqualDataBoundBeans(job, project.getBuildersList().get(0));
}

Expand Down
6 changes: 4 additions & 2 deletions aip-console-tools-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ The available options are :
snapshot or from publishing application to the Health dashboard. *default* : false
* `--module-option` (optional) Generates a user defined module option forr either technology module or analysis unit
module.
Possible value is one of: full_content, one_per_au, one_per_techno
Possible value is one of: preserve_configured, full_content, one_per_au, one_per_techno.
* **NOTE** Use Preserve Configured option to keep your existing module generation type unchanged.
*NOTE*: When creating a version, if a previous version exists, it's configuration will be cloned to the new version,
but the new source will be used for analysis.
Expand Down Expand Up @@ -338,7 +339,8 @@ The available options are :
* `--consolidation` or `--upload-application` (optional) : When sets to false, this prevents from consolidating
* `--module-option` (optional) Generates a user defined module option forr either technology module or analysis unit
module.
Possible value is one of: full_content, one_per_au, one_per_techno
Possible value is one of: preserve_configured, full_content, one_per_au, one_per_techno
* **NOTE** Use Preserve Configured option to keep your existing module generation type unchanged.
* snapshot or from publishing application to the Health dashboard. *default* : false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public Integer processCallCommand() throws Exception {
} else {
builder.endStep(Constants.ANALYZE);
}

applicationService.updateModuleGenerationType(applicationGuid, builder, moduleGenerationType, false);

builder.versionName(versionToAnalyze.getName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public void setModuleOptionsGenerationType(String appGuid, ModuleGenerationType

@Override
public void updateModuleGenerationType(String applicationGuid, JobRequestBuilder builder, ModuleGenerationType moduleGenerationType, boolean firstVersion) {
if (moduleGenerationType != null) {
if (moduleGenerationType != null && moduleGenerationType != ModuleGenerationType.PRESERVE_CONFIGURED) {
if (moduleGenerationType == ModuleGenerationType.FULL_CONTENT) {
setModuleOptionsGenerationType(applicationGuid, moduleGenerationType);
log.info("Module option has been set to " + moduleGenerationType);
Expand Down

0 comments on commit 3d4ac45

Please sign in to comment.