Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ repositories {
maven {
url 'https://nexus-internal.cloudbees.com/content/groups/mirror'
credentials {
username = nexusUsername
password = nexusPassword
username = System.getenv('NEXUS_USERNAME') ?: nexusUsername
password = System.getenv('NEXUS_PASSWORD') ?: nexusPassword
}
}
}
Expand Down
14 changes: 13 additions & 1 deletion src/main/resources/project/ec_setup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,12 @@
category => "Application Server"
);

my %checkEntityForExistence = (
label => "WebSphere - Check Entity for Existence",
procedure => 'CheckEntityForExistence',
description => 'Check whether entity exists',
category => 'Application Server',
);

$batch->deleteProperty("/server/ec_customEditors/pickerStep/WebSphere - Start App");
$batch->deleteProperty("/server/ec_customEditors/pickerStep/WebSphere - Stop App");
Expand Down Expand Up @@ -523,6 +529,10 @@
$batch->deleteProperty("/server/ec_customEditors/pickerStep/WebSphere - Create First Cluster Member");
$batch->deleteProperty("/server/ec_customEditors/pickerStep/WebSphere - Create Cluster Members");

# Check Entities for Existence
$batch->deleteProperty("/server/ec_customEditors/pickerStep/WebSphere - Check Entity for Existence");


@::createStepPickerSteps = (
\%checkPageStatus, \%checkServerStatus,
\%startServer, \%stopServer,
Expand Down Expand Up @@ -566,7 +576,9 @@
\%createCluster,
# Create 1st cluster member
# Uncomment after 2.5.0 release
\%createFirstClusterMember, \%createClusterMembers
\%createFirstClusterMember, \%createClusterMembers,
# Check Entity for existence
\%checkEntityForExistence
);

if ($upgradeAction eq "upgrade") {
Expand Down
33 changes: 29 additions & 4 deletions src/main/resources/project/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,11 @@
<!-- <path>conf/createcfg.pl</path> -->
<path>conf/createConfiguration.pl</path>
</file>
<file>
<xpath>//procedure[procedureName=&quot;CreateConfiguration&quot;]/step[stepName=&quot;CreateAndAttachCredential&quot;]/command</xpath>
<path>conf/createAndAttachCredential.pl</path>
</file>
<!-- Create and attach credential is deprecated and should be removed -->
<!-- <file> -->
<!-- <xpath>//procedure[procedureName=&quot;CreateConfiguration&quot;]/step[stepName=&quot;CreateAndAttachCredential&quot;]/command</xpath> -->
<!-- <path>conf/createAndAttachCredential.pl</path> -->
<!-- </file> -->
<!-- Adding steps with credentials into the CreateConfiguration to be referenced during build-->
<file>
<xpath>//procedure[procedureName=&quot;CreateConfiguration&quot;]/propertySheet/property[propertyName=&quot;ec_stepsWithAttachedCredentials&quot;]/value</xpath>
Expand Down Expand Up @@ -938,6 +939,30 @@
</file>
<!-- End of StopCluster procedure files -->



<!-- CheckEntityForExistence procedure files -->
<!-- XML Form -->
<file>
<xpath>//procedure[procedureName=&quot;CheckEntityForExistence&quot;]/propertySheet/property[propertyName=&quot;ec_parameterForm&quot;]/value</xpath>
<path>parameterForms/Entity/CheckEntityForExistence.xml</path>
</file>
<!-- Python script -->
<file>
<xpath>//property[propertyName=&quot;check_entity_for_existence.py&quot;]/value</xpath>
<path>wsadmin_scripts/Entity/check_entity_for_existence.py</path>
</file>
<!-- Perl script -->
<file>
<xpath>//procedure[procedureName=&quot;CheckEntityForExistence&quot;]/step[stepName=&quot;CheckEntityForExistence&quot;]/command</xpath>
<path>server/Entity/checkEntityForExistence.pl</path>
</file>
<!-- End of CheckEntityForExistence procedure files -->





<!-- PDK Perl Libs-->

<file>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<!--

Copyright 2015 CloudBees, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<editor>
<help>https://docs.cloudbees.com/docs/cloudbees-cd/latest/plugins/ec-websphere#CheckEntityForExistence</help>
<formElement>
<type>entry</type>
<label>Configuration Name:</label>
<!-- Improvements for CEV-18687 -->
<configuration>1</configuration>
<!-- End of improvements for CEV-18687 -->
<property>configname</property>
<propertyReference>/plugins/@PLUGIN_NAME@/project/websphere_cfgs</propertyReference>
<documentation>Name of the configuration to be used. URL, port and credentials are retrieved from the given configuration. To view or create a new configuration, go to the Administration -> Plugins tab, and select 'Configure' action for @PLUGIN_KEY@ plugin.</documentation>
<htmlDocumentation>Name of the configuration to be used. URL, port and credentials are retrieved from the given configuration.</htmlDocumentation>
<required>1</required>
</formElement>
<formElement>
<label>Entity Name:</label>
<property>wasEntityName</property>
<type>entry</type>
<required>1</required>
<documentation>Entity Name</documentation>
</formElement>
<formElement>
<label>Entity Type:</label>
<property>wasEntityType</property>
<type>select</type>
<required>1</required>
<documentation>The Entity Type</documentation>
<option>
<name>Data Source</name>
<value>DataSource</value>
</option>
<option>
<name>Shared Library</name>
<value>Library</value>
</option>
<option>
<name>Custom JVM Property</name>
<value>Property</value>
</option>
</formElement>
<formElement>
<label>Entity Scope:</label>
<property>wasEntityScope</property>
<type>entry</type>
<required>1</required>
<documentation>Entity Scope</documentation>
</formElement>
<formElement>
<label>Procedure Handling Logic:</label>
<property>wasProcedureHandlingLogic</property>
<type>select</type>
<required>1</required>
<documentation>Procedure Handling Logic</documentation>
<option>
<name>Success if entity exists</name>
<value>failIfDoesNotExist</value>
</option>
<option>
<name>Success if entity DOES NOT exist</name>
<value>failIfExists</value>
</option>
<option>
<name>Procedure is success, result in the output parameters</name>
<value>pass</value>
</option>
</formElement>

<formElement>
<label>Output Property Path:</label>
<property>wasOutputPropertyPath</property>
<type>entry</type>
<required>0</required>
<documentation>
Output Property Path
</documentation>
</formElement>
</editor>
4 changes: 4 additions & 0 deletions src/main/resources/project/procedures_with_credentials.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,9 @@
{
"stepName": "CreateClusterMembers",
"procedureName": "CreateClusterMembers"
},
{
"stepName": "CheckEntityForExistence",
"procedureName": "CheckEntityForExistence"
}
]
184 changes: 184 additions & 0 deletions src/main/resources/project/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,11 @@
<propertyName>list_cluster_members.py</propertyName>
<value/>
</property>
<!-- Check entity for existence -->
<property>
<propertyName>check_entity_for_existence.py</propertyName>
<value/>
</property>
</propertySheet>
</property>
<!-- This property is here to keep line of postp matcher loader -->
Expand Down Expand Up @@ -13885,5 +13890,184 @@
</procedure>

<!-- End of CreateClusterMembers procedure -->


<!-- CheckEntityForExistence procedure -->
<procedure>
<procedureName>CheckEntityForExistence</procedureName>
<description>Checks whether entity does exist</description>
<jobNameTemplate>websphere-check-entity-for-existence-$[jobId]</jobNameTemplate>
<resourceName />
<workspaceName />
<projectName>@PLUGIN_KEY@-@PLUGIN_VERSION@</projectName>
<propertySheet>
<property>
<propertyName>ec_parameterForm</propertyName>
<expandable>1</expandable>
<value></value>
</property>
<property>
<propertyName>ec_customEditorData</propertyName>
<propertySheet>
<property>
<propertyName>parameters</propertyName>
<propertySheet>

<property>
<propertyName>configname</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>standard</value>
</property>
</propertySheet>
</property>
<property>
<propertyName>wasEntityName</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>standard</value>
</property>
</propertySheet>
</property>
<property>
<propertyName>wasEntityType</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>standard</value>
</property>
</propertySheet>
</property>

<property>
<propertyName>wasEntityScope</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>standard</value>
</property>
</propertySheet>
</property>

<property>
<propertyName>wasProcedureHandlingLogic</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>standard</value>
</property>
</propertySheet>
</property>

<property>
<propertyName>wasOutputPropertyPath</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>standard</value>
</property>
</propertySheet>
</property>


</propertySheet>
</property>
</propertySheet>
</property>
</propertySheet>
<formalParameter>
<formalParameterName>configname</formalParameterName>
<defaultValue/>
<description>Name of the configuration to be used. URL, port and credentials are retrieved from the given configuration.
To view or create a new configuration,
go to the Administration -> Plugins tab, and select 'Configure' action for @PLUGIN_KEY@ plugin.</description>
<required>1</required>
<type>entry</type>
</formalParameter>

<formalParameter>
<formalParameterName>wasEntityName</formalParameterName>
<defaultValue/>
<description>WAS Entity Type To Check</description>
<required>1</required>
<type>entry</type>
</formalParameter>
<formalParameter>
<formalParameterName>wasEntityType</formalParameterName>
<defaultValue/>
<description>WAS Entity Type To Check</description>
<required>1</required>
<type>entry</type>
</formalParameter>

<formalParameter>
<formalParameterName>wasEntityScope</formalParameterName>
<defaultValue/>
<description>WAS entity scope</description>
<required>1</required>
<type>entry</type>
</formalParameter>

<formalParameter>
<formalParameterName>wasProcedureHandlingLogic</formalParameterName>
<defaultValue/>
<description>WAS Procedure Handling Logic</description>
<required>0</required>
<type>entry</type>
</formalParameter>

<formalParameter>
<formalParameterName>wasOutputPropertyPath</formalParameterName>
<defaultValue/>
<description>WAS Output Property Path</description>
<required>1</required>
<type>entry</type>
</formalParameter>


<step>
<stepName>CheckEntityForExistence</stepName>
<alwaysRun>0</alwaysRun>
<broadcast>0</broadcast>
<command></command>
<condition />
<errorHandling>failProcedure</errorHandling>
<exclusive>0</exclusive>
<logFileName />
<parallel>0</parallel>
<!-- <postProcessor>$[/myProject/postp_loader]</postProcessor> -->
<releaseExclusive>0</releaseExclusive>
<resourceName />
<retries>0</retries>
<shell>ec-perl</shell>
<timeLimit>5</timeLimit>
<timeLimitUnits>minutes</timeLimitUnits>
<workingDirectory />
<workspaceName />
<procedureName>CheckEntityForExistence</procedureName>
<projectName>@PLUGIN_KEY@-@PLUGIN_VERSION@</projectName>
<propertySheet>
<property>
<propertyName>ec_customEditorData</propertyName>
<propertySheet>
<property>
<propertyName>formType</propertyName>
<expandable>1</expandable>
<value>command</value>
</property>
</propertySheet>
</property>
</propertySheet>
</step>
</procedure>
<!-- End of CheckEntityForExistence procedure -->
</project>
</exportedData>
Loading