Skip to content

Commit

Permalink
Merge branch 'main' into 2.1.0p17
Browse files Browse the repository at this point in the history
  • Loading branch information
sfuhrm committed Jan 17, 2024
2 parents da58ced + caa6006 commit 21e13f8
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 38 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/extract-all-openapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Extracts the OpenAPI specs from multiple Checkmk versions and stores them as an artifact

name: Extract all OpenAPI specs

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
extract-all-openapi:
uses: 1and1/checkmk-java-client/.github/workflows/extract-openapi.yaml@main
with:
cmk_version: ${{ matrix.version }}
target_artifact: openapi
file_name: checkmk_${{ matrix.version }}_openapi.yml
strategy:
matrix:
version:
- 2.0.0p1
- 2.0.0p2
- 2.0.0p3
- 2.0.0p4
- 2.0.0p5
- 2.0.0p6
- 2.0.0p7
- 2.0.0p8
- 2.0.0p9
- 2.0.0p10
- 2.0.0p11
- 2.0.0p12
- 2.0.0p13
- 2.0.0p14
- 2.0.0p15
- 2.0.0p16
- 2.0.0p17
- 2.0.0p18
- 2.0.0p19
- 2.0.0p20
- 2.0.0p21
- 2.0.0p22
- 2.0.0p23
- 2.0.0p24
- 2.0.0p25
- 2.0.0p26
- 2.0.0p27
- 2.0.0p28
- 2.0.0p29
- 2.0.0p30
- 2.0.0p31
- 2.0.0p32
- 2.0.0p33
- 2.0.0p34
- 2.0.0p35
- 2.0.0p36
- 2.0.0p37
- 2.0.0p38
- 2.0.0p39
- 2.1.0p1
- 2.1.0p2
- 2.1.0p3
- 2.1.0p4
- 2.1.0p5
- 2.1.0p6
- 2.1.0p8
- 2.1.0p9
- 2.1.0p10
- 2.1.0p11
- 2.1.0p12
- 2.1.0p13
- 2.1.0p14
- 2.1.0p15
- 2.1.0p16
- 2.1.0p17
- 2.1.0p18
- 2.1.0p19
- 2.1.0p20
- 2.1.0p21
- 2.1.0p22
- 2.1.0p23
- 2.1.0p24
- 2.1.0p25
- 2.1.0p26
- 2.1.0p27
- 2.1.0p28
- 2.1.0p29
- 2.1.0p30
- 2.1.0p31
- 2.1.0p32
- 2.1.0p33
- 2.1.0p34
- 2.1.0p35
- 2.1.0p36
- 2.2.0p1
- 2.2.0p2
- 2.2.0p3
- 2.2.0p4
- 2.2.0p5
- 2.2.0p6
- 2.2.0p7
- 2.2.0p8
- 2.2.0p9
- 2.2.0p11
- 2.2.0p12
- 2.2.0p14
9 changes: 6 additions & 3 deletions .github/workflows/extract-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ on:
target_artifact:
required: true
type: string

file_name:
type: string
default: openapi-doc.yaml

jobs:
extract-openapi:
runs-on: ubuntu-latest
Expand All @@ -22,12 +25,12 @@ jobs:
run: while ! curl "http://localhost:8080//cmk/check_mk/"; do sleep 1; echo -n "."; done

- name: Fetch the OpenAPI spec
run: curl -H 'Authorization:Bearer cmkadmin HELLO' "http://localhost:8080/cmk/check_mk/api/v0/openapi-doc.yaml" -o openapi-doc.yaml
run: curl -H 'Authorization:Bearer cmkadmin HELLO' "http://localhost:8080/cmk/check_mk/api/v0/openapi-doc.yaml" -o ${{ inputs.file_name }}

- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.target_artifact }}
path: openapi-doc.yaml
path: ${{ inputs.file_name }}

- name: Kill cmk
run: docker kill cmk
28 changes: 2 additions & 26 deletions .github/workflows/maven-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,8 @@ on:

jobs:

extract-openapi:
uses: 1and1/checkmk-java-client/.github/workflows/extract-openapi.yaml@main
with:
cmk_version: 2.2.0p12
target_artifact: openapi

generate-code:
needs: extract-openapi
uses: 1and1/checkmk-java-client/.github/workflows/generate-code.yaml@main
with:
cmk_version: 2.2.0p12
source_artifact: openapi
target_artifact: source
snapshot: false

build:
runs-on: ubuntu-latest
needs: generate-code
outputs:
version: ${{ steps.version.outputs.version }}
md5sum: ${{ steps.md5sum.outputs.md5sum }}
Expand All @@ -42,18 +26,10 @@ jobs:
distribution: 'adopt'
java-version: 17

- name: Download source
uses: actions/download-artifact@v3
with:
name: source

- name: Download openapi
uses: actions/download-artifact@v3
with:
name: openapi

- name: Build with Maven
run: mvn -B package --file pom.xml
env:
JAVA_POST_PROCESS_FILE: ./java_post_process_file.sh

- name: Extract current maven version
run: echo "::set-output name=version::$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)"
Expand Down
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand Down Expand Up @@ -127,7 +127,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>add_sources</id>
Expand Down Expand Up @@ -158,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.2</version>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -194,7 +194,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.0.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>release</releaseProfiles>
Expand Down Expand Up @@ -239,7 +239,7 @@
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<version>1.10.0</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
Expand All @@ -260,7 +260,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -317,7 +317,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<configuration>
<keyname>0AC5A45E91FA93DA25380017B0D87B063EAD41F1</keyname>
</configuration>
Expand Down Expand Up @@ -413,11 +413,11 @@
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<gson-fire-version>1.8.5</gson-fire-version>
<gson-fire-version>1.9.0</gson-fire-version>
<swagger-core-version>1.6.3</swagger-core-version>
<okhttp-version>4.12.0</okhttp-version>
<gson-version>2.10.1</gson-version>
<commons-lang3-version>3.13.0</commons-lang3-version>
<commons-lang3-version>3.14.0</commons-lang3-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
<jakarta.el-version>3.0.3</jakarta.el-version>
Expand Down

0 comments on commit 21e13f8

Please sign in to comment.