Skip to content

Commit fc075cc

Browse files
authored
Merge pull request #440 from Artmorse/dual-stack-support-2
External IP Address can't be configured (dual-stack mode)
2 parents 84d7e02 + aa25c76 commit fc075cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/com/google/jenkins/plugins/computeengine/InstanceConfiguration.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public class InstanceConfiguration implements Describable<InstanceConfiguration>
132132
private NetworkInterfaceIpStackMode networkInterfaceIpStackMode;
133133

134134
@Deprecated
135-
private boolean externalAddress;
135+
private Boolean externalAddress;
136136

137137
private boolean useInternalAddress;
138138
private boolean ignoreProxy;
@@ -353,7 +353,10 @@ public ComputeEngineInstance provision() throws IOException {
353353
/** Initializes transient properties */
354354
protected Object readResolve() {
355355
labelSet = Label.parse(labels);
356-
this.networkInterfaceIpStackMode = new NetworkInterfaceSingleStack(externalAddress);
356+
if (externalAddress != null) {
357+
this.networkInterfaceIpStackMode = new NetworkInterfaceSingleStack(externalAddress);
358+
this.externalAddress = null;
359+
}
357360
return this;
358361
}
359362

0 commit comments

Comments
 (0)