Skip to content

Commit 63c930b

Browse files
Carroll Chioutimja
andauthored
[JENKINS-71737] rename cloudName to name (#462)
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
1 parent edc8876 commit 63c930b

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<gitHubRepo>jenkinsci/azure-vm-agents-plugin</gitHubRepo>
4848
<jenkins.version>2.387.3</jenkins.version>
4949
<maven.javadoc.skip>true</maven.javadoc.skip>
50-
<hpi.compatibleSinceVersion>846</hpi.compatibleSinceVersion>
50+
<hpi.compatibleSinceVersion>883</hpi.compatibleSinceVersion>
5151
</properties>
5252

5353
<dependencyManagement>

src/main/java/com/microsoft/azure/vmagent/AzureVMCloud.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public class AzureVMCloud extends Cloud {
135135

136136
@DataBoundConstructor
137137
public AzureVMCloud(
138-
String cloudName,
138+
String name,
139139
String azureCredentialsId,
140140
String maxVirtualMachinesLimit,
141141
String deploymentTimeout,
@@ -145,7 +145,7 @@ public AzureVMCloud(
145145
List<AzureVMAgentTemplate> vmTemplates) {
146146
super(
147147
getOrGenerateCloudName(
148-
cloudName,
148+
name,
149149
azureCredentialsId,
150150
getResourceGroupName(
151151
resourceGroupReferenceType,
@@ -268,10 +268,10 @@ public String getCloudName() {
268268
return this.name;
269269
}
270270

271-
public static String getOrGenerateCloudName(String cloudName, String credentialId, String resourceGroupName) {
272-
return StringUtils.isBlank(cloudName)
271+
public static String getOrGenerateCloudName(String name, String credentialId, String resourceGroupName) {
272+
return StringUtils.isBlank(name)
273273
? AzureUtil.getCloudName(credentialId, resourceGroupName)
274-
: cloudName;
274+
: name;
275275
}
276276

277277
public String getNewResourceGroupName() {

src/main/resources/com/microsoft/azure/vmagent/AzureVMCloud/config.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<f:block>
55
<a href="${rootURL}/log/${descriptor.logRecorderName}/" target="_blank">${%Azure_VM_Agent_Log_Link}</a>
66
</f:block>
7-
<f:entry title="${%Cloud_Name}" field="cloudName"
7+
<f:entry title="${%Cloud_Name}" field="name"
88
help="/plugin/azure-vm-agents/help-cloudName.html">
99
<f:textbox/>
1010
</f:entry>

src/test/resources/com/microsoft/azure/vmagent/test/jcasc/advanced.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jenkins:
22
clouds:
33
- azureVM:
44
azureCredentialsId: "azure-cred"
5-
cloudName: "azure"
5+
name: "azure"
66
cloudTags:
77
- name: "author"
88
value: "gavin"

src/test/resources/com/microsoft/azure/vmagent/test/jcasc/basic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jenkins:
22
clouds:
33
- azureVM:
44
azureCredentialsId: "azure-cred"
5-
cloudName: "azure"
5+
name: "azure"
66
deploymentTimeout: 1200
77
maxVirtualMachinesLimit: 10
88
newResourceGroupName: "vm-agent"

src/test/resources/com/microsoft/azure/vmagent/test/jcasc/expectedAdvanced.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
- azureVM:
22
azureCredentialsId: "azure-cred"
3-
cloudName: "azure"
43
cloudTags:
54
- name: "author"
65
value: "gavin"
76
deploymentTimeout: 1200
87
existingResourceGroupName: "vm-agents"
98
maxVirtualMachinesLimit: 10
9+
name: "azure"
1010
resourceGroupReferenceType: "existing"
1111
vmTemplates:
1212
- agentWorkspace: "/opt/jenkins"

src/test/resources/com/microsoft/azure/vmagent/test/jcasc/expectedBasic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- azureVM:
22
azureCredentialsId: "azure-cred"
3-
cloudName: "azure"
43
deploymentTimeout: 1200
54
maxVirtualMachinesLimit: 10
5+
name: "azure"
66
newResourceGroupName: "vm-agent"
77
resourceGroupReferenceType: "new"
88
vmTemplates:

0 commit comments

Comments
 (0)