-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Loïc Greffier
committed
Jan 9, 2023
1 parent
328b0dd
commit 004ed68
Showing
236 changed files
with
600 additions
and
4,951 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Check PR | ||
name: Pull request | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
@@ -11,15 +12,13 @@ jobs: | |
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
fetch-depth: 0 | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
version: '21.1.0' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
distribution: 'temurin' | ||
|
||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
|
@@ -37,66 +36,12 @@ jobs: | |
|
||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew jacocoTestReport sonarqube --info | ||
run: ./gradlew build jacocoTestReport sonarqube --info | ||
|
||
- name: Publish Test Report | ||
- name: Publish test report | ||
if: always() | ||
uses: mikepenz/action-junit-report@v3 | ||
with: | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
|
||
- name: Native image for CLI | ||
run: ./gradlew :cli:shadowJar :cli:nativeImage | ||
|
||
- name: Upload Linux native Kafkactl | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: native-image | ||
path: ${{ github.workspace }}/cli/build/native-image/kafkactl-* | ||
|
||
- name: Upload JAR Kafkactl | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: jar | ||
path: ${{ github.workspace }}/cli/build/libs/kafkactl-*.jar | ||
|
||
build-windows: | ||
runs-on: windows-latest | ||
environment: Build | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '20.3.2' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Configure Pagefile | ||
uses: al-cheb/[email protected] | ||
|
||
- name: Native image for CLI | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 | ||
gradlew.bat :cli:shadowJar :cli:nativeImage | ||
shell: cmd | ||
|
||
- name: Upload Windows native Kafkactl | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: native-image-windows | ||
path: ${{ github.workspace }}/cli/build/native-image/kafkactl-*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
name: Snapshot | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-linux: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: Build | ||
steps: | ||
- name: Docker Login | ||
uses: docker/login-action@v1.8.0 | ||
- name: Docker login | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.MICHELIN_DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.MICHELIN_DOCKER_HUB_PASSWD }} | ||
|
||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
fetch-depth: 0 | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
version: '21.1.0' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install native image | ||
run: gu install native-image | ||
distribution: 'temurin' | ||
|
||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
|
@@ -46,66 +42,21 @@ jobs: | |
|
||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew build jacocoTestReport sonarqube --info | ||
|
||
- name: Push ns4kafka and kafkactl | ||
run: ./gradlew dockerBuild api:dockerPush cli:dockerPush | ||
|
||
- name: Native image for CLI | ||
run: ./gradlew :cli:shadowJar :cli:nativeImage | ||
|
||
- name: Upload Linux native Kafkactl | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: native-image-linux | ||
path: ${{ github.workspace }}/cli/build/native-image/kafkactl-* | ||
|
||
- name: Upload JAR Kafkactl | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jar | ||
path: ${{ github.workspace }}/cli/build/libs/kafkactl-*.jar | ||
|
||
build-windows: | ||
runs-on: windows-latest | ||
environment: Build | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
- name: Publish test report | ||
if: always() | ||
uses: mikepenz/action-junit-report@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '20.3.2' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install native image | ||
run: ${{ env.JAVA_HOME }}\bin\gu.cmd install native-image | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Configure Pagefile | ||
uses: al-cheb/[email protected] | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
|
||
- name: Native image for CLI | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 | ||
gradlew.bat :cli:shadowJar :cli:nativeImage | ||
shell: cmd | ||
- name: Docker | ||
run: ./gradlew dockerBuild dockerPush | ||
|
||
- name: Upload Windows native Kafkactl | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: native-image-windows | ||
path: ${{ github.workspace }}/cli/build/native-image/kafkactl-*.exe | ||
name: ns4kafka | ||
path: ${{ github.workspace }}/build/libs/ns4kafka-*-all.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: [ '*' ] | ||
|
||
jobs: | ||
build-linux: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: Build | ||
steps: | ||
- name: Docker Login | ||
uses: docker/login-action@v1.8.0 | ||
- name: Docker login | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.MICHELIN_DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.MICHELIN_DOCKER_HUB_PASSWD }} | ||
|
||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
fetch-depth: 0 | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
version: '21.1.0' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install Native Image | ||
run: gu install native-image | ||
distribution: 'temurin' | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
|
@@ -37,96 +33,31 @@ jobs: | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Build and Test | ||
- name: Build and test | ||
id: build_and_test | ||
run: | | ||
./gradlew build check -Prelease | ||
echo ::set-output name=current_version::$(echo $(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')) | ||
- name: Native Image for CLI | ||
run: ./gradlew :cli:shadowJar :cli:nativeImage -Prelease | ||
|
||
- name: Push ns4kafka and kafkactl | ||
run: ./gradlew dockerBuild api:dockerPush cli:dockerPush -Prelease | ||
|
||
- name: Upload Linux native Kafkactl | ||
uses: actions/upload-artifact@v3 | ||
- name: Publish test report | ||
if: always() | ||
uses: mikepenz/action-junit-report@v3 | ||
with: | ||
name: native-image-linux | ||
path: ${{ github.workspace }}/cli/build/native-image/kafkactl-* | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
|
||
- name: Upload JAR Kafkactl | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: jar | ||
path: ${{ github.workspace }}/cli/build/libs/kafkactl-*.jar | ||
- name: Docker | ||
run: ./gradlew dockerBuild dockerPush | ||
|
||
- name: Generate Release Changelog | ||
- name: Generate release changelog | ||
uses: mikepenz/release-changelog-builder-action@v1 | ||
id: build_changelog | ||
with: | ||
configuration: "changelog-builder.json" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: ${{ steps.build_changelog.outputs.changelog }} | ||
artifacts: ${{ github.workspace }}/cli/build/native-image/kafkactl-${{ steps.build_and_test.outputs.current_version }},${{ github.workspace }}/cli/build/libs/kafkactl-*.jar | ||
draft: true | ||
prerelease: true | ||
allowUpdates: true | ||
|
||
build-windows: | ||
runs-on: windows-latest | ||
environment: Build | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Set up GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '20.3.2' | ||
java-version: '11' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install native image | ||
run: ${{ env.JAVA_HOME }}\bin\gu.cmd install native-image | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Configure Pagefile | ||
uses: al-cheb/[email protected] | ||
|
||
- name: Native image for CLI | ||
run: | | ||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 | ||
gradlew.bat :cli:shadowJar :cli:nativeImage | ||
shell: cmd | ||
|
||
- name: Upload Windows native Kafkactl | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: native-image-windows | ||
path: ${{ github.workspace }}/cli/build/native-image/kafkactl-*.exe | ||
|
||
- name: Update release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: ${{ steps.build_changelog.outputs.changelog }} | ||
artifacts: ${{ github.workspace }}/cli/build/native-image/kafkactl-*.exe | ||
draft: true | ||
prerelease: true | ||
allowUpdates: true | ||
name: ns4kafka | ||
path: ${{ github.workspace }}/build/libs/ns4kafka-*-all.jar |
Oops, something went wrong.