Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing checkbox serialization by jelly views #110

Merged
merged 1 commit into from
Dec 12, 2016
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ public class ContainerTemplate extends AbstractDescribableImpl<ContainerTemplate

private String image;

private Boolean privileged;
private boolean privileged;

private Boolean alwaysPullImage;
private boolean alwaysPullImage;

private String workingDir = DEFAULT_WORKING_DIR;

private String command;

private String args;

private Boolean ttyEnabled;
private boolean ttyEnabled;

private String resourceRequestCpu;

Expand Down Expand Up @@ -99,11 +99,11 @@ public String getArgs() {
}

@DataBoundSetter
public void setTtyEnabled(Boolean ttyEnabled) {
public void setTtyEnabled(boolean ttyEnabled) {
this.ttyEnabled = ttyEnabled;
}

public Boolean isTtyEnabled() {
public boolean isTtyEnabled() {
return ttyEnabled;
}

Expand All @@ -121,20 +121,20 @@ public String getWorkingDir() {
}

@DataBoundSetter
public void setPrivileged(Boolean privileged) {
public void setPrivileged(boolean privileged) {
this.privileged = privileged;
}

public Boolean isPrivileged() {
public boolean isPrivileged() {
return privileged;
}

@DataBoundSetter
public void setAlwaysPullImage(Boolean alwaysPullImage) {
public void setAlwaysPullImage(boolean alwaysPullImage) {
this.alwaysPullImage = alwaysPullImage;
}

public Boolean isAlwaysPullImage() {
public boolean isAlwaysPullImage() {
return alwaysPullImage;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ private Container createContainer(KubernetesSlave slave, ContainerTemplate conta
return new ContainerBuilder()
.withName(substituteEnv(containerTemplate.getName()))
.withImage(substituteEnv(containerTemplate.getImage()))
.withImagePullPolicy(containerTemplate.isAlwaysPullImage() != null && containerTemplate.isAlwaysPullImage() ? "Always" : "IfNotPresent")
.withImagePullPolicy(containerTemplate.isAlwaysPullImage() ? "Always" : "IfNotPresent")
.withNewSecurityContext()
.withPrivileged(containerTemplate.isPrivileged())
.endSecurityContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public static ContainerTemplate combine(ContainerTemplate parent, ContainerTempl

String name = template.getName();
String image = Strings.isNullOrEmpty(template.getImage()) ? parent.getImage() : template.getImage();
Boolean privileged = template.isPrivileged() != null ? template.isPrivileged() : (parent.isPrivileged() != null ? parent.isPrivileged() : false);
Boolean alwaysPullImage = template.isAlwaysPullImage() != null ? template.isAlwaysPullImage() : (parent.isAlwaysPullImage() != null ? parent.isAlwaysPullImage() : false);
boolean privileged = template.isPrivileged() ? template.isPrivileged() : (parent.isPrivileged() ? parent.isPrivileged() : false);
boolean alwaysPullImage = template.isAlwaysPullImage() ? template.isAlwaysPullImage() : (parent.isAlwaysPullImage() ? parent.isAlwaysPullImage() : false);
String workingDir = Strings.isNullOrEmpty(template.getWorkingDir()) ? (Strings.isNullOrEmpty(parent.getWorkingDir()) ? DEFAULT_WORKING_DIR : parent.getWorkingDir()) : template.getCommand();
String command = Strings.isNullOrEmpty(template.getCommand()) ? parent.getCommand() : template.getCommand();
String args = Strings.isNullOrEmpty(template.getArgs()) ? parent.getArgs() : template.getArgs();
Boolean ttyEnabled = template.isTtyEnabled() != null ? template.isTtyEnabled() : (parent.isTtyEnabled() != null ? parent.isTtyEnabled() : false);;
boolean ttyEnabled = template.isTtyEnabled() ? template.isTtyEnabled() : (parent.isTtyEnabled() ? parent.isTtyEnabled() : false);;
String resourceRequestCpu = Strings.isNullOrEmpty(template.getResourceRequestCpu()) ? parent.getResourceRequestCpu() : template.getResourceRequestCpu();
String resourceRequestMemory = Strings.isNullOrEmpty(template.getResourceRequestMemory()) ? parent.getResourceRequestMemory() : template.getResourceRequestMemory();
String resourceLimitCpu = Strings.isNullOrEmpty(template.getResourceLimitCpu()) ? parent.getResourceLimitCpu() : template.getResourceLimitCpu();
Expand Down