Skip to content

Commit

Permalink
[JENKINS-71737] rename cloudName to name (#462)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
  • Loading branch information
car-roll and timja authored Sep 14, 2023
1 parent edc8876 commit 63c930b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<gitHubRepo>jenkinsci/azure-vm-agents-plugin</gitHubRepo>
<jenkins.version>2.387.3</jenkins.version>
<maven.javadoc.skip>true</maven.javadoc.skip>
<hpi.compatibleSinceVersion>846</hpi.compatibleSinceVersion>
<hpi.compatibleSinceVersion>883</hpi.compatibleSinceVersion>
</properties>

<dependencyManagement>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/microsoft/azure/vmagent/AzureVMCloud.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public class AzureVMCloud extends Cloud {

@DataBoundConstructor
public AzureVMCloud(
String cloudName,
String name,
String azureCredentialsId,
String maxVirtualMachinesLimit,
String deploymentTimeout,
Expand All @@ -145,7 +145,7 @@ public AzureVMCloud(
List<AzureVMAgentTemplate> vmTemplates) {
super(
getOrGenerateCloudName(
cloudName,
name,
azureCredentialsId,
getResourceGroupName(
resourceGroupReferenceType,
Expand Down Expand Up @@ -268,10 +268,10 @@ public String getCloudName() {
return this.name;
}

public static String getOrGenerateCloudName(String cloudName, String credentialId, String resourceGroupName) {
return StringUtils.isBlank(cloudName)
public static String getOrGenerateCloudName(String name, String credentialId, String resourceGroupName) {
return StringUtils.isBlank(name)
? AzureUtil.getCloudName(credentialId, resourceGroupName)
: cloudName;
: name;
}

public String getNewResourceGroupName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<f:block>
<a href="${rootURL}/log/${descriptor.logRecorderName}/" target="_blank">${%Azure_VM_Agent_Log_Link}</a>
</f:block>
<f:entry title="${%Cloud_Name}" field="cloudName"
<f:entry title="${%Cloud_Name}" field="name"
help="/plugin/azure-vm-agents/help-cloudName.html">
<f:textbox/>
</f:entry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ jenkins:
clouds:
- azureVM:
azureCredentialsId: "azure-cred"
cloudName: "azure"
name: "azure"
cloudTags:
- name: "author"
value: "gavin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ jenkins:
clouds:
- azureVM:
azureCredentialsId: "azure-cred"
cloudName: "azure"
name: "azure"
deploymentTimeout: 1200
maxVirtualMachinesLimit: 10
newResourceGroupName: "vm-agent"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- azureVM:
azureCredentialsId: "azure-cred"
cloudName: "azure"
cloudTags:
- name: "author"
value: "gavin"
deploymentTimeout: 1200
existingResourceGroupName: "vm-agents"
maxVirtualMachinesLimit: 10
name: "azure"
resourceGroupReferenceType: "existing"
vmTemplates:
- agentWorkspace: "/opt/jenkins"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- azureVM:
azureCredentialsId: "azure-cred"
cloudName: "azure"
deploymentTimeout: 1200
maxVirtualMachinesLimit: 10
name: "azure"
newResourceGroupName: "vm-agent"
resourceGroupReferenceType: "new"
vmTemplates:
Expand Down

0 comments on commit 63c930b

Please sign in to comment.