diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/InstanceConfiguration.java b/src/main/java/com/google/jenkins/plugins/computeengine/InstanceConfiguration.java index dffbc3bd..06063bc3 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/InstanceConfiguration.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/InstanceConfiguration.java @@ -822,7 +822,7 @@ public FormValidation doCheckMachineType(@QueryParameter String value) { } public FormValidation doCheckMaxRunDurationSeconds( - @QueryParameter String value, @QueryParameter(value="provisioningType") String provisioningTypeIdx) { + @QueryParameter String value, @QueryParameter(value = "provisioningType") String provisioningTypeIdx) { try { long maxRunDurationSeconds = Long.parseLong(value); if (maxRunDurationSeconds < 0) { @@ -834,7 +834,8 @@ public FormValidation doCheckMaxRunDurationSeconds( .get(Integer.parseInt(provisioningTypeIdx)) .getProvisioningTypeValue(); if (provisioningTypeValue == PREEMPTIBLE) { - return FormValidation.warning("Max run duration is not supported for preemptible VMs and will be ignored."); + return FormValidation.warning( + "Max run duration is not supported for preemptible VMs and will be ignored."); } } diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/PreemptibleVm.java b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/PreemptibleVm.java index 11c1ca5c..7b490a86 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/PreemptibleVm.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/PreemptibleVm.java @@ -1,8 +1,23 @@ +/* + * Copyright 2024 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. + */ + package com.google.jenkins.plugins.computeengine.ui.helpers; import hudson.Extension; import org.kohsuke.stapler.DataBoundConstructor; -import org.kohsuke.stapler.DataBoundSetter; @SuppressWarnings("unused") public class PreemptibleVm extends ProvisioningType { diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningType.java b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningType.java index b96c516f..d76deb76 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningType.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningType.java @@ -1,9 +1,24 @@ -package com.google.jenkins.plugins.computeengine.ui.helpers; +/* + * Copyright 2024 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. + */ -import org.kohsuke.stapler.DataBoundSetter; +package com.google.jenkins.plugins.computeengine.ui.helpers; import hudson.model.AbstractDescribableImpl; import hudson.model.Descriptor; +import org.kohsuke.stapler.DataBoundSetter; /** * ProvisioningType represents the type of VM to be provisioned. diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningTypeValue.java b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningTypeValue.java index 1727e7b6..ac342003 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningTypeValue.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/ProvisioningTypeValue.java @@ -1,3 +1,19 @@ +/* + * Copyright 2024 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. + */ + package com.google.jenkins.plugins.computeengine.ui.helpers; public enum ProvisioningTypeValue { diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/SpotVm.java b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/SpotVm.java index e54c756f..4cc69bb0 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/SpotVm.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/SpotVm.java @@ -1,8 +1,23 @@ +/* + * Copyright 2024 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. + */ + package com.google.jenkins.plugins.computeengine.ui.helpers; import hudson.Extension; import org.kohsuke.stapler.DataBoundConstructor; -import org.kohsuke.stapler.DataBoundSetter; @SuppressWarnings("unused") public class SpotVm extends ProvisioningType { diff --git a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/Standard.java b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/Standard.java index 443d87f5..93b2d1ae 100644 --- a/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/Standard.java +++ b/src/main/java/com/google/jenkins/plugins/computeengine/ui/helpers/Standard.java @@ -1,8 +1,23 @@ +/* + * Copyright 2024 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. + */ + package com.google.jenkins.plugins.computeengine.ui.helpers; import hudson.Extension; import org.kohsuke.stapler.DataBoundConstructor; -import org.kohsuke.stapler.DataBoundSetter; @SuppressWarnings("unused") public class Standard extends ProvisioningType {