Skip to content
Merged
16 changes: 11 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.50</version>
<version>4.66</version>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bumped this to 4.66 due to needing a higher version of configuration-as-code-plugin.
Version 1647.ve39ca_b_829b_42 onwards of configuration-as-code includes changes made for the html 3.x update. As you can see further down, I have bumped configuration-as-code to the latest release.

</parent>

<groupId>org.jenkinsci.plugins</groupId>
Expand Down Expand Up @@ -40,15 +40,15 @@
<changelist>-SNAPSHOT</changelist>

<!-- jenkins versions -->
<jenkins.version>2.332.4</jenkins.version>
<bom.artifactId>bom-2.332.x</bom.artifactId>
<bom.version>1763.v092b_8980a_f5e</bom.version>
<jenkins.version>2.401.1</jenkins.version>
<bom.artifactId>bom-2.401.x</bom.artifactId>
<bom.version>2244.vd60654536b_96</bom.version>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When initially bumping kubernetes-client-api, it needed a dependency on snakeyaml-api 2.0 and Jenkins needed to be at least 2.361.4 or higher.


<!-- dependency versions -->
<authentication-tokens.version>1.3</authentication-tokens.version>
<docker-commons.version>1.15</docker-commons.version>
<google-oauth-plugin.version>0.8</google-oauth-plugin.version>
<kubernetes-client-api.version>6.3.1-206.v76d3b_6b_14db_b</kubernetes-client-api.version>
<kubernetes-client-api.version>6.8.1-220.v1f66736f9a_42</kubernetes-client-api.version>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version number will need to be checked when this PR is merged jenkinsci/kubernetes-client-api-plugin#221 and we have a new release version for kubernetes-client-api. It needs to be at least 6.8.0 to be compatible with the snakeyaml 2.0 changes.

Copy link
Member

@Vlatombe Vlatombe Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


<!-- maven plugins versions -->
<maven-coveralls.version>4.3.0</maven-coveralls.version>
Expand All @@ -66,6 +66,11 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>snakeyaml-api</artifactId>
<version>2.0-999999-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down Expand Up @@ -105,6 +110,7 @@
<dependency>
<groupId>io.jenkins</groupId>
<artifactId>configuration-as-code</artifactId>
<version>1670.v564dc8b_982d0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ public ConfigBuilder decorate(ConfigBuilder builder, KubernetesAuthConfig config
}

public io.fabric8.kubernetes.api.model.ConfigBuilder buildConfigBuilder(KubernetesAuthConfig config, String context, String clusterName, String username) throws KubernetesAuthException {
try {
io.fabric8.kubernetes.api.model.Config kubeConfig = KubeConfigUtils.parseConfigFromString(getKubeconfig());
return new io.fabric8.kubernetes.api.model.ConfigBuilder(kubeConfig);
} catch (IOException e) {
throw new KubernetesAuthException(e.getMessage(), e);
}
io.fabric8.kubernetes.api.model.Config kubeConfig = KubeConfigUtils.parseConfigFromString(getKubeconfig());
return new io.fabric8.kubernetes.api.model.ConfigBuilder(kubeConfig);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When bumping to version 6.8.1 we had a compilation error on this try catch:
kubernetes-credentials-plugin\src\main\java\org\jenkinsci\plugins\kubernetes\auth\impl\KubernetesAuthKubeconfig.java:[35,10] error: exception IOException is never thrown in body of corresponding try statement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could change it to catch a general Exception perhaps?

}

public String getKubeconfig() {
Expand Down