Skip to content

Commit

Permalink
Merge pull request #3118 from codefromthecrypt/maven-wrapper
Browse files Browse the repository at this point in the history
update maven wrapper to latest, and adjust CI to use it
  • Loading branch information
k8s-ci-robot authored Feb 29, 2024
2 parents 82b9130 + 90c260c commit a4a067b
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 257 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
distribution: 'temurin'
java-version: 11
- name: Verify Format and License
run: mvn spotless:check
run: ./mvnw spotless:check
build:
name: Java ${{ matrix.java }} Maven Test on ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
EXCLUDED_EXAMPLE_MODULES=`ls examples | grep examples | xargs -I {} echo '!examples/{}' | tr '\n' ',' | sed 's/.$//'`
MODS_OVERRIDES=$MODS_OVERRIDES,$EXCLUDED_EXAMPLE_MODULES
fi
mvn -q -B --define=org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn $MODS_OVERRIDES clean test
./mvnw -q -B --define=org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn $MODS_OVERRIDES clean test
build-graalvm:
runs-on: ubuntu-latest
name: GraalVM Maven Test
Expand All @@ -63,7 +63,7 @@ jobs:
java-version: '17'
components: 'native-image'
- name: Build with Maven
run: mvn -q test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
run: ./mvnw -q test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
e2e:
runs-on: ubuntu-latest
name: End-to-End Test Against Real Cluster
Expand All @@ -78,15 +78,17 @@ jobs:
java-version: 17.0.x
- name: Run E2E with Maven
run: |
mvn clean install \
./mvnw clean install \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-q \
-Dmaven.test.skip=true
cd e2e
mvn test \
../mvnw test \
-B \
-De2e.skip=false \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
env:
mvnw: ${{ github.workspace }}/mvnw
examples:
runs-on: ubuntu-latest
name: Examples smoke test
Expand All @@ -106,30 +108,32 @@ jobs:
${{ runner.os }}-maven-
- name: Build with Maven
run: |
mvn clean install \
./mvnw clean install \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-q \
-Dmaven.test.skip=true
- name: Build Cert Manager Contrib
run: |
cd client-java-contrib/cert-manager
mvn clean install \
../../mvnw clean install \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-q \
-Dmaven.test.skip=true
- name: Build Prometheus Contrib
run: |
cd client-java-contrib/prometheus-operator
mvn clean install \
../../mvnw clean install \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-q \
-Dmaven.test.skip=true
- name: Examples
run: |
for d in $(find examples* -maxdepth 1 -type d)
do
mvn clean install -Dmaven.test.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
${MVNW} clean install -Dmaven.test.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
done
env:
MVNW: ${{ github.workspace }}/mvnw
codegen:
runs-on: ubuntu-latest
services:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
git config user.name "Kubernetes Publisher"
- name: Check Current Version
run: |
mvn -q \
./mvnw -q \
-Dexec.executable=echo \
-Dexec.args='${project.version}' \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Release Prepare
run: |
git checkout -b 'automated-release-${{ github.event.inputs.releaseVersion }}'
mvn --batch-mode \
./mvnw --batch-mode \
release:prepare \
-Dtag=v${{ github.event.inputs.releaseVersion }} \
-DconnectionUrl=https://${{ github.token }}@github.com/${{ github.repository }}.git \
Expand All @@ -76,7 +76,7 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
run: |
# The tests are already executed in the prepare, skipping
mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -DlocalCheckout=true -Darguments=-DskipTests release:perform
./mvnw -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -DlocalCheckout=true -Darguments=-DskipTests release:perform
git push https://${{ github.token }}@github.com/${{ github.repository }}.git \
automated-release-${{ github.event.inputs.releaseVersion }}:automated-release-${{ github.event.inputs.releaseVersion }}
git push https://${{ github.token }}@github.com/${{ github.repository }}.git v${{ github.event.inputs.releaseVersion }}
Expand Down
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
8 changes: 4 additions & 4 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ Now we are ready to perform the release.
Make sure there are no unstaged changes, otherwise `mvn` will reject the
release. There are two commands to be run in the root directory:

1. `mvn release:prepare -DdryRun=true`: This will perform a dry run of the
1. `./mvnw release:prepare -DdryRun=true`: This will perform a dry run of the
automated SCM modifications that will performed in the next step. If
everything looks OK - you're good to continue.

2. `mvn release:clean release:prepare release:perform`: This will first clean
2. `./mvnw release:clean release:prepare release:perform`: This will first clean
any staged modifications made in the prior run, commit a new `pom.xml`
version, tag your source with the current release, build and sign your
artifacts with your GPG key, and publish the release to Maven central.
Expand All @@ -157,7 +157,7 @@ PR against the main repository.

Now that the release is consumable, there are two things left to do:

1. Find the newly released tag that was pushed by `mvn release:prepare` under
1. Find the newly released tag that was pushed by `./mvnw release:prepare` under
the [tags](https://github.com/kubernetes-client/java/tags) of the client
library, and click "Add release notes". Title the release version of the form
`MAJOR.MINOR.PATCH`, and include the changelog in the release description.
Expand All @@ -173,7 +173,7 @@ Let's add entries here as we run into problems.
* **Authentication problems**: Ensure your git SSH keys & JIRA account have
access to https://github.com/kubernetes-client/java and the
`io.kubernetes:client-java` repositories respectively. If this is the case,
check `mvn release:<command>` output for complaints of malformed
check `./mvnw release:<command>` output for complaints of malformed
`settings.xml` entries.

* **Undo a mistake**: If you've made a mistake during a release, and the
Expand Down
Loading

0 comments on commit a4a067b

Please sign in to comment.