1010
1111
1212jobs :
13- release :
13+ generate :
1414 runs-on : ubuntu-latest
1515 steps :
1616 - name : Checkout Java
1717 uses : actions/checkout@v3
18+ - name : Setup Java
19+ uses : actions/setup-java@v2
20+ with :
21+ distribution : ' temurin'
22+ java-version : 8.0.x
1823 - name : Checkout Gen
1924 uses : actions/checkout@v3
2025 with :
@@ -25,26 +30,45 @@ jobs:
2530 run : |
2631 SUFFIX=$(openssl rand -hex 4)
2732 echo "BRANCH=automated-generate-$SUFFIX" >> $GITHUB_ENV
28- - name : Generate
33+ - name : Get Project Version
34+ run : |
35+ echo "PROJECT_VERSION=$(mvn -q \
36+ -Dexec.executable="echo" \
37+ -Dexec.args='${project.version}' \
38+ --non-recursive \
39+ org.codehaus.mojo:exec-maven-plugin:1.6.0:exec)" >> $GITHUB_ENV
40+ - name : Generate Openapi
2941 run : |
30- cd gen/openapi
42+ pushd gen/openapi
3143 cat <<"EOF"> settings
3244 # Kubernetes branch to get the OpenAPI spec from.
3345 export KUBERNETES_BRANCH="${{ github.event.inputs.kubernetesBranch }}"
3446
3547 # client version for packaging and releasing. It can
3648 # be different than SPEC_VERSION.
37- export CLIENT_VERSION=$(mvn -q \
38- -Dexec.executable="echo" \
39- -Dexec.args='${project.version}' \
40- --non-recursive \
41- org.codehaus.mojo:exec-maven-plugin:1.6.0:exec)
49+ export CLIENT_VERSION=${{ env.PROJECT_VERSION }}
4250
51+ # Name of the release package
4352 export PACKAGE_NAME="io.kubernetes.client.openapi"
4453 EOF
4554
4655 bash java.sh ../../kubernetes/ settings
47- cd ../../
56+ popd
57+ rm -rf gen
58+ - name : Generate Fluent
59+ run : |
60+ # Only install the generated openapi module because the higher modules' compile
61+ # may fail due to api-changes.
62+ mvn -Pfluent-gen -pl kubernetes -am clean install
63+ pushd fluent-gen
64+ bash -x generate.sh
65+ popd
66+ - name : Formatter
67+ run : |
68+ mvn spotless:apply
69+ - name : Commit and push
70+ run : |
71+ # Commit and push
4872 git config user.email "k8s.ci.robot@gmail.com"
4973 git config user.name "Kubernetes Prow Robot"
5074 git checkout -b "$BRANCH"
0 commit comments