Skip to content

Commit 9fa5e7e

Browse files
committed
Update maven from 3.5 to 3.6.3 and required dependencies
This also includes: * Upgraded openapi-generator-maven-plugin for all generators to 4.3.1. This is the latest v4.x. There's a 5.x but didn't want ot push too much. I'd rather do it in separated PR. * Added skipValidateSpec option to several generations, otherwise the k8s was considered not valid. * Updated installed packaged from Debian 9 to Debian 10. This is the version used by the new maven image. NOTE: using maven plugin for csharp would allow to get rid of this extra packages I suspect. * Updated dotnet installation according to official docs https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-10- * Some minnor fixes: remove unnecessary maven depencies, format,...
1 parent 5c6d90b commit 9fa5e7e

12 files changed

+22
-27
lines changed

openapi/csharp.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<project
2-
xmlns="http://maven.apache.org/POM/4.0.0"
1+
<project
2+
xmlns="http://maven.apache.org/POM/4.0.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>io.kubernetes</groupId>
@@ -12,7 +12,7 @@
1212
<plugin>
1313
<groupId>org.codehaus.mojo</groupId>
1414
<artifactId>exec-maven-plugin</artifactId>
15-
<version>1.1.1</version>
15+
<version>3.0.0</version>
1616
<executions>
1717
<execution>
1818
<id>generate</id>

openapi/go.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ popd > /dev/null
4646
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
4747
source "${SETTING_FILE}"
4848

49-
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v3.3.4}" \
49+
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}" \
5050
CLIENT_LANGUAGE=go; \
5151
CLEANUP_DIRS=(pkg); \
5252
kubeclient::generator::generate_client "${OUTPUT_DIR}"

openapi/go.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<build>
99
<plugins>
1010
<plugin>
11-
<groupId>org.openapitools</groupId>
11+
<groupId>org.openapitools</groupId>
1212
<artifactId>openapi-generator-maven-plugin</artifactId>
1313
<version>${openapi-generator-version}</version>
1414
<executions>
@@ -21,6 +21,7 @@
2121
<language>go</language>
2222
<gitUserId>kubernetes-client</gitUserId>
2323
<gitRepoId>go</gitRepoId>
24+
<skipValidateSpec>true</skipValidateSpec>
2425
<configOptions>
2526
<packageName>${generator.package.name}</packageName>
2627
<packageVersion>${generator.client.version}</packageVersion>

openapi/java.xml

-6
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,9 @@
109109
<artifactId>swagger-annotations</artifactId>
110110
<version>${swagger-annotations-version}</version>
111111
</dependency>
112-
<dependency>
113-
<groupId>org.openapitools</groupId>
114-
<artifactId>openapi-generator-maven-plugin</artifactId>
115-
<version>${openapi-generator-version}</version>
116-
</dependency>
117112
</dependencies>
118113
<properties>
119114
<swagger-annotations-version>1.5.0</swagger-annotations-version>
120-
<maven-plugin-version>1.0.0</maven-plugin-version>
121115
<!-- Default values for the generator parameters. -->
122116
<generator.output.path>.</generator.output.path>
123117
<generator.spec.path>swagger.json</generator.spec.path>

openapi/openapi-generator/Dockerfile

+9-11
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM maven:3.5-jdk-8-slim
15+
FROM maven:3.6.3-openjdk-11-slim
1616
ARG OPENAPI_GENERATOR_COMMIT
1717
ARG GENERATION_XML_FILE
1818
ARG OPENAPI_GENERATOR_USER_ORG=OpenAPITools
@@ -21,7 +21,7 @@ ARG OPENAPI_GENERATOR_USER_ORG=OpenAPITools
2121
RUN apt-get update && apt-get -y install git python-pip && pip install urllib3==1.24.2
2222

2323
# Install Autorest
24-
RUN apt-get update && apt-get -qq -y install libunwind8 libicu57 libssl1.0 liblttng-ust0 libcurl3 libuuid1 libkrb5-3 zlib1g
24+
RUN apt-get update && apt-get -qq -y install libunwind8 libssl1.0 liblttng-ust0 libcurl4 libuuid1 libkrb5-3 zlib1g
2525
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
2626
RUN apt-get update && apt-get -y install \
2727
nodejs \
@@ -46,15 +46,13 @@ RUN mkdir -p /node_modules && chmod -R go+rwx /node_modules
4646
RUN npm install @microsoft.azure/autorest.csharp \
4747
@microsoft.azure/autorest.modeler
4848

49-
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
50-
RUN mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
51-
RUN curl https://packages.microsoft.com/config/debian/9/prod.list > prod.list
52-
RUN mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
53-
RUN chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
54-
RUN chown root:root /etc/apt/sources.list.d/microsoft-prod.list
55-
56-
RUN apt-get update
57-
RUN apt-get install -yy -q dotnet-hosting-2.0.8
49+
# Install dotnet
50+
RUN curl https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb --output packages-microsoft-prod.deb
51+
RUN dpkg -i packages-microsoft-prod.deb
52+
RUN apt-get update; \
53+
apt-get install -y apt-transport-https && \
54+
apt-get update && \
55+
apt-get install -y dotnet-sdk-5.0
5856

5957

6058
# Copy required files

openapi/openapi-generator/client-generator.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ kubeclient::generator::generate_client() {
4141
: "${CLIENT_LANGUAGE?Must set CLIENT_LANGUAGE env var}"
4242

4343
OPENAPI_GENERATOR_USER_ORG="${OPENAPI_GENERATOR_USER_ORG:-OpenAPITools}"
44-
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v3.3.4}"
44+
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"
4545
OPENAPI_MODEL_LENGTH="${OPENAPI_MODEL_LENGTH:-}"
4646
OPENAPI_SKIP_FETCH_SPEC="${OPENAPI_SKIP_FETCH_SPEC:-}"
4747
OPENAPI_SKIP_BASE_INTERFACE="${OPENAPI_SKIP_BASE_INTERFACE:-}"

openapi/perl.xml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<language>perl</language>
2222
<gitUserId>kubernetes-client</gitUserId>
2323
<gitRepoId>perl</gitRepoId>
24+
<skipValidateSpec>true</skipValidateSpec>
2425
<generateApiTests>false</generateApiTests>
2526
<generateModelTests>false</generateModelTests>
2627
<configOptions>

openapi/python-asyncio.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ source "${SETTING_FILE}"
4545

4646
# use openapi-generator to generate library
4747
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
48-
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.2.3}"
48+
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"
4949

5050
CLIENT_LANGUAGE=python-asyncio
5151
CLEANUP_DIRS=(client/apis client/models docs test)

openapi/python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ popd > /dev/null
4545

4646
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
4747
source "${SETTING_FILE}"
48-
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.0}"
48+
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"
4949

5050
CLIENT_LANGUAGE=python; \
5151
CLEANUP_DIRS=(client/api client/apis client/models docs test); \

openapi/ruby.xml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<language>ruby</language>
2222
<gitUserId>kubernetes-client</gitUserId>
2323
<gitRepoId>ruby</gitRepoId>
24+
<skipValidateSpec>true</skipValidateSpec>
2425
<generateApiTests>false</generateApiTests>
2526
<generateModelTests>false</generateModelTests>
2627
<configOptions>

openapi/typescript-jquery.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ popd > /dev/null
4646
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
4747
source "${SETTING_FILE}"
4848

49-
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.0.3}"; \
49+
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"; \
5050
CLIENT_LANGUAGE=typescript-jquery; \
5151
CLEANUP_DIRS=(api model); \
5252
kubeclient::generator::generate_client "${OUTPUT_DIR}"

openapi/typescript.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ popd > /dev/null
4646
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
4747
source "${SETTING_FILE}"
4848

49-
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.0.3}"; \
49+
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"; \
5050
CLIENT_LANGUAGE=typescript; \
5151
CLEANUP_DIRS=(api model); \
5252
kubeclient::generator::generate_client "${OUTPUT_DIR}"

0 commit comments

Comments
 (0)