Skip to content

Update maven from 3.5 to 3.6.3 and required dependencies #184

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

Closed
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
6 changes: 3 additions & 3 deletions openapi/csharp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
<project
xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>
<groupId>io.kubernetes</groupId>
Expand All @@ -12,7 +12,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<version>3.0.0</version>
<executions>
<execution>
<id>generate</id>
Expand Down
2 changes: 1 addition & 1 deletion openapi/go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ popd > /dev/null
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
source "${SETTING_FILE}"

OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v3.3.4}" \
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}" \
CLIENT_LANGUAGE=go; \
CLEANUP_DIRS=(pkg); \
kubeclient::generator::generate_client "${OUTPUT_DIR}"
Expand Down
3 changes: 2 additions & 1 deletion openapi/go.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<build>
<plugins>
<plugin>
<groupId>org.openapitools</groupId>
<groupId>org.openapitools</groupId>
Copy link
Contributor

@brendandburns brendandburns Mar 2, 2021

Choose a reason for hiding this comment

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

This indentation is weird, please format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue is that in that line there are 2 tabs while the rest of the file uses spaces. GitHub may be missleading, but the IDE comparision shows it better:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, you need to be consistent with the rest of the file and use spaces.

<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-version}</version>
<executions>
Expand All @@ -21,6 +21,7 @@
<language>go</language>
<gitUserId>kubernetes-client</gitUserId>
<gitRepoId>go</gitRepoId>
<skipValidateSpec>true</skipValidateSpec>
<configOptions>
<packageName>${generator.package.name}</packageName>
<packageVersion>${generator.client.version}</packageVersion>
Expand Down
6 changes: 0 additions & 6 deletions openapi/java.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,9 @@
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations-version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-version}</version>
</dependency>
</dependencies>
<properties>
<swagger-annotations-version>1.5.0</swagger-annotations-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<!-- Default values for the generator parameters. -->
<generator.output.path>.</generator.output.path>
<generator.spec.path>swagger.json</generator.spec.path>
Expand Down
20 changes: 9 additions & 11 deletions openapi/openapi-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

# Install Autorest
RUN apt-get update && apt-get -qq -y install libunwind8 libicu57 libssl1.0 liblttng-ust0 libcurl3 libuuid1 libkrb5-3 zlib1g
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these are required for autorest/dotnet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only changes are:

  • Removed libicu57: could not find equivalent for debian10.
  • Replaced libcurl3 by libcurl4: which is the "offical" replacement. Though there are some mentions of not all software being compatible.

About if the are required, once we have csharp working again we hopefuly be able to put that at rest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Have a look here:
https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md

libicu63 is the debian 10 replacement.

RUN apt-get update && apt-get -qq -y install libunwind8 libssl1.0 liblttng-ust0 libcurl4 libuuid1 libkrb5-3 zlib1g
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get update && apt-get -y install \
nodejs \
Expand All @@ -46,15 +46,13 @@ RUN mkdir -p /node_modules && chmod -R go+rwx /node_modules
RUN npm install @microsoft.azure/autorest.csharp \
@microsoft.azure/autorest.modeler

RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
RUN mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
RUN curl https://packages.microsoft.com/config/debian/9/prod.list > prod.list
RUN mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
RUN chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
RUN chown root:root /etc/apt/sources.list.d/microsoft-prod.list

RUN apt-get update
RUN apt-get install -yy -q dotnet-hosting-2.0.8
# Install dotnet
RUN curl https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb --output packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get update; \
apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-5.0


# Copy required files
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi-generator/client-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ kubeclient::generator::generate_client() {
: "${CLIENT_LANGUAGE?Must set CLIENT_LANGUAGE env var}"

OPENAPI_GENERATOR_USER_ORG="${OPENAPI_GENERATOR_USER_ORG:-OpenAPITools}"
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v3.3.4}"
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"
OPENAPI_MODEL_LENGTH="${OPENAPI_MODEL_LENGTH:-}"
OPENAPI_SKIP_FETCH_SPEC="${OPENAPI_SKIP_FETCH_SPEC:-}"
OPENAPI_SKIP_BASE_INTERFACE="${OPENAPI_SKIP_BASE_INTERFACE:-}"
Expand Down
1 change: 1 addition & 0 deletions openapi/perl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<language>perl</language>
<gitUserId>kubernetes-client</gitUserId>
<gitRepoId>perl</gitRepoId>
<skipValidateSpec>true</skipValidateSpec>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<configOptions>
Expand Down
2 changes: 1 addition & 1 deletion openapi/python-asyncio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ source "${SETTING_FILE}"

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

CLIENT_LANGUAGE=python-asyncio
CLEANUP_DIRS=(client/apis client/models docs test)
Expand Down
2 changes: 1 addition & 1 deletion openapi/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ popd > /dev/null

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

CLIENT_LANGUAGE=python; \
CLEANUP_DIRS=(client/api client/apis client/models docs test); \
Expand Down
1 change: 1 addition & 0 deletions openapi/ruby.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<language>ruby</language>
<gitUserId>kubernetes-client</gitUserId>
<gitRepoId>ruby</gitRepoId>
<skipValidateSpec>true</skipValidateSpec>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<configOptions>
Expand Down
2 changes: 1 addition & 1 deletion openapi/typescript-jquery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ popd > /dev/null
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
source "${SETTING_FILE}"

OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.0.3}"; \
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v4.3.1}"; \
CLIENT_LANGUAGE=typescript-jquery; \
CLEANUP_DIRS=(api model); \
kubeclient::generator::generate_client "${OUTPUT_DIR}"
2 changes: 1 addition & 1 deletion openapi/typescript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ popd > /dev/null
source "${SCRIPT_ROOT}/openapi-generator/client-generator.sh"
source "${SETTING_FILE}"

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