{
@DataBoundConstructor
public SvExportBuilder(String serverName, boolean force, String targetDirectory, boolean cleanTargetDirectory,
- SvServiceSelectionModel serviceSelection, boolean switchToStandByFirst) {
- super(new SvExportModel(serverName, force, targetDirectory, cleanTargetDirectory, serviceSelection, switchToStandByFirst));
+ SvServiceSelectionModel serviceSelection, boolean switchToStandByFirst, boolean archive) {
+ super(new SvExportModel(serverName, force, targetDirectory, cleanTargetDirectory, serviceSelection, switchToStandByFirst, archive));
}
@Override
@@ -95,6 +97,7 @@ protected void performImpl(@Nonnull Run, ?> run, @Nonnull FilePath workspace,
IChmodeProcessor chmodeProcessor = new ChmodeProcessor(null);
ICommandExecutor exec = createCommandExecutor();
+ IProject project = null;
verifyNotNull(model.getTargetDirectory(), "Target directory must be set");
@@ -104,6 +107,10 @@ protected void performImpl(@Nonnull Run, ?> run, @Nonnull FilePath workspace,
cleanTargetDirectory(logger, targetDirectory);
}
+ if (model.getServiceSelection().getSelectionType().equals(SvServiceSelectionModel.SelectionType.PROJECT)) {
+ project = new ProjectBuilder().buildProject(new File(model.getServiceSelection().getProjectPath()), model.getServiceSelection().getProjectPassword());
+ }
+
for (ServiceInfo serviceInfo : getServiceList(false, logger, workspace)) {
if (model.isSwitchToStandByFirst()) {
switchToStandBy(serviceInfo, chmodeProcessor, exec, logger);
@@ -111,7 +118,12 @@ protected void performImpl(@Nonnull Run, ?> run, @Nonnull FilePath workspace,
logger.printf(" Exporting service '%s' [%s] to %s %n", serviceInfo.getName(), serviceInfo.getId(), targetDirectory);
verifyNotLearningBeforeExport(logger, exec, serviceInfo);
- exportProcessor.process(exec, targetDirectory, serviceInfo.getId(), false);
+ if (!model.getServiceSelection().getSelectionType().equals(SvServiceSelectionModel.SelectionType.PROJECT)) {
+ exportProcessor.process(exec, targetDirectory, serviceInfo.getId(), project, false, model.isArchive());
+ }
+ }
+ if (model.getServiceSelection().getSelectionType().equals(SvServiceSelectionModel.SelectionType.PROJECT)) {
+ exportProcessor.process(exec, targetDirectory, null, project, false, model.isArchive());
}
}
@@ -142,9 +154,13 @@ private void cleanTargetDirectory(PrintStream logger, String targetDirectory) th
File target = new File(targetDirectory);
if (target.exists()) {
File[] subfolders = target.listFiles((FilenameFilter) DirectoryFileFilter.INSTANCE);
- if (subfolders.length > 0) {
+ File[] files = target.listFiles((FilenameFilter) new SuffixFileFilter(".vproja"));
+ if (subfolders.length > 0 || files.length > 0) {
logger.println(" Cleaning target directory...");
}
+ for(File file : files) {
+ FileUtils.forceDelete(file);
+ }
for (File subfolder : subfolders) {
if (subfolder.listFiles((FilenameFilter) new SuffixFileFilter(".vproj")).length > 0) {
logger.println(" Deleting subfolder of target directory: " + subfolder.getAbsolutePath());
diff --git a/src/main/resources/com/hpe/application/automation/tools/run/SvChangeModeBuilder/config.properties b/src/main/resources/com/hpe/application/automation/tools/run/SvChangeModeBuilder/config.properties
index 7f22c96417..32f3b79c6a 100644
--- a/src/main/resources/com/hpe/application/automation/tools/run/SvChangeModeBuilder/config.properties
+++ b/src/main/resources/com/hpe/application/automation/tools/run/SvChangeModeBuilder/config.properties
@@ -1,6 +1,6 @@
#
-# © Copyright 2013 EntIT Software LLC
-# Certain versions of software and/or documents (“Material”) accessible here may contain branding from
+# ? Copyright 2013 EntIT Software LLC
+# Certain versions of software and/or documents (“Material?) accessible here may contain branding from
# Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017,
# the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP
# and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE
@@ -32,4 +32,4 @@
#
# suppress inspection "UnusedProperty"
-NoSvServerDefined=No HPE Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
+NoSvServerDefined=No Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
diff --git a/src/main/resources/com/hpe/application/automation/tools/run/SvDeployBuilder/config.properties b/src/main/resources/com/hpe/application/automation/tools/run/SvDeployBuilder/config.properties
index 7f22c96417..32f3b79c6a 100644
--- a/src/main/resources/com/hpe/application/automation/tools/run/SvDeployBuilder/config.properties
+++ b/src/main/resources/com/hpe/application/automation/tools/run/SvDeployBuilder/config.properties
@@ -1,6 +1,6 @@
#
-# © Copyright 2013 EntIT Software LLC
-# Certain versions of software and/or documents (“Material”) accessible here may contain branding from
+# ? Copyright 2013 EntIT Software LLC
+# Certain versions of software and/or documents (“Material?) accessible here may contain branding from
# Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017,
# the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP
# and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE
@@ -32,4 +32,4 @@
#
# suppress inspection "UnusedProperty"
-NoSvServerDefined=No HPE Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
+NoSvServerDefined=No Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
diff --git a/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.jelly b/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.jelly
index ffca04f9a4..e4ca1b915d 100644
--- a/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.jelly
+++ b/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.jelly
@@ -68,4 +68,8 @@
+
+
+
+
diff --git a/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.properties b/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.properties
index 7f22c96417..32f3b79c6a 100644
--- a/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.properties
+++ b/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/config.properties
@@ -1,6 +1,6 @@
#
-# © Copyright 2013 EntIT Software LLC
-# Certain versions of software and/or documents (“Material”) accessible here may contain branding from
+# ? Copyright 2013 EntIT Software LLC
+# Certain versions of software and/or documents (“Material?) accessible here may contain branding from
# Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017,
# the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP
# and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE
@@ -32,4 +32,4 @@
#
# suppress inspection "UnusedProperty"
-NoSvServerDefined=No HPE Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
+NoSvServerDefined=No Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
diff --git a/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/help-archive.html b/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/help-archive.html
new file mode 100644
index 0000000000..536fe1c866
--- /dev/null
+++ b/src/main/resources/com/hpe/application/automation/tools/run/SvExportBuilder/help-archive.html
@@ -0,0 +1,36 @@
+
+
+
+ If set, Export service(s) as project archive(s) (.vproja).
+
diff --git a/src/main/resources/com/hpe/application/automation/tools/run/SvUndeployBuilder/config.properties b/src/main/resources/com/hpe/application/automation/tools/run/SvUndeployBuilder/config.properties
index 7f22c96417..32f3b79c6a 100644
--- a/src/main/resources/com/hpe/application/automation/tools/run/SvUndeployBuilder/config.properties
+++ b/src/main/resources/com/hpe/application/automation/tools/run/SvUndeployBuilder/config.properties
@@ -1,6 +1,6 @@
#
-# © Copyright 2013 EntIT Software LLC
-# Certain versions of software and/or documents (“Material”) accessible here may contain branding from
+# ? Copyright 2013 EntIT Software LLC
+# Certain versions of software and/or documents (“Material?) accessible here may contain branding from
# Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017,
# the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP
# and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE
@@ -32,4 +32,4 @@
#
# suppress inspection "UnusedProperty"
-NoSvServerDefined=No HPE Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file
+NoSvServerDefined=No Service Virtualization server is defined. To use this build step, goto Manage Jenkins->Configure System->Service Virtualization->Add SV server
\ No newline at end of file