Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "false"
"installMaven": "false",
"installGradle": "true"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
Expand Down
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@


# BACKEND
/pom.xml @kafbat/backend
/build.gradle @kafbat/backend
/gradle.properties @kafbat/backend
/settings.gradle @kafbat/backend
/gradle/ @kafbat/backend
/contract/ @kafbat/backend
/api/ @kafbat/backend
/serde-api/ @kafbat/backend
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:

- package-ecosystem: maven
- package-ecosystem: gradle
directory: "/"
schedule:
interval: weekly
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/aws_ami_publish.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/backend_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
branches: [ "main" ]
paths:
- "pom.xml"
- "build.gradle"
- "gradle.properties"
- "settings.gradle"
- "gradle/libs.versions.toml"

- "contract/**"
- "api/**"
- "serde-api/**"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/backend_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
pull_request_target:
types: [ "opened", "reopened", "synchronize" ]
paths:
- "pom.xml"
- "build.gradle"
- "gradle.properties"
- "settings.gradle"
- "gradle/libs.versions.toml"

- "contract/**"
- "api/**"
- "serde-api/**"
Expand Down
40 changes: 6 additions & 34 deletions .github/workflows/backend_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Backend: build and test"
name: "Backend: tests & sonar"

on:
workflow_call:
Expand Down Expand Up @@ -30,40 +30,12 @@ jobs:
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
cache: 'gradle'

- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: "Pull request: Maven tests & sonar"
if: ${{ inputs.event_name == 'pull_request' || inputs.event_name == 'pull_request_target' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}
HEAD_REF: ${{ github.head_ref }}
BASE_REF: ${{ github.base_ref }}
SKIP_SONAR: "true" # TODO remove when public
- name: "Tests"
run: |
./mvnw -B -ntp versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
./mvnw -B -V -ntp verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.skip=${SKIP_SONAR} \
-Dsonar.projectKey=io.kafbat:kafbat-ui_backend \
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
-Dsonar.pullrequest.branch=$HEAD_REF \
-Dsonar.pullrequest.base=$BASE_REF
./gradlew :api:test --info

- name: "Main: Maven tests & sonar"
if: ${{ inputs.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}
SKIP_SONAR: "true" # TODO remove when public
- name: "Sonar"
run: |
./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
./mvnw -B -V -ntp verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.skip=${SKIP_SONAR} \
-Dsonar.projectKey=io.kafbat:kafbat-ui_backend
./gradlew sonar --info
10 changes: 9 additions & 1 deletion .github/workflows/block_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ jobs:
with:
mode: exactly
count: 0
labels: "status/blocked, status/needs-attention, status/on-hold, status/pending, status/triage, status/pending-backend, status/pending-frontend, status/pending-QA"
labels: >
status/blocked,
status/needs-attention,
status/on-hold,
status/pending,
status/triage,
status/pending-backend,
status/pending-frontend,
status/pending-QA
4 changes: 2 additions & 2 deletions .github/workflows/branch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
cache: 'gradle'
- name: Build
id: build
run: |
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
push: true
tags: 297478128798.dkr.ecr.eu-central-1.amazonaws.com/kafka-ui:${{ steps.extract_branch.outputs.tag }}
build-args: |
JAR_FILE=api-${{ steps.build.outputs.version }}.jar
JAR_FILE=build/libs/api-${{ steps.build.outputs.version }}.jar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
outputs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-public-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
cache: 'gradle'
- name: Build
id: build
run: |
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
push: true
tags: ${{ vars.ECR_REGISTRY }}/${{ github.repository }}:${{ steps.extract_branch.outputs.tag }}
build-args: |
JAR_FILE=api-${{ steps.build.outputs.version }}.jar
JAR_FILE=build/libs/api-${{ steps.build.outputs.version }}.jar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: make comment with private deployment link
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ on:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
- "build.gradle"
- "gradle.properties"
- "settings.gradle"
- "gradle/libs.versions.toml"

- 'frontend/**'
- "pom.xml"

- "contract/**"
- 'api/**'
- 'serde-api/**'
Expand All @@ -24,7 +29,7 @@ permissions:

jobs:
analyze:
name: Analyze
name: CodeQL Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -47,7 +52,7 @@ jobs:
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
cache: 'gradle'

- name: Autobuild
uses: github/codeql-action/autobuild@v3
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/cve_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ jobs:
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
cache: 'gradle'

- name: Build project
id: build
run: |
./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
./mvnw -B -V -ntp clean package -DskipTests
export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
./gradlew clean build \
-x test \
-Pbuild-docker-images=true \
-Pinclude-frontend=true \
-Pversion=latest

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -60,16 +61,16 @@ jobs:
push: false
load: true
tags: |
ghcr.io/kafbat/kafka-ui:${{ steps.build.outputs.version }}
ghcr.io/kafbat/kafka-ui:latest
build-args: |
JAR_FILE=api-${{ steps.build.outputs.version }}.jar
JAR_FILE=build/libs/api-latest.jar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Run CVE checks
uses: aquasecurity/[email protected]
with:
image-ref: "ghcr.io/kafbat/kafka-ui:${{ steps.build.outputs.version }}"
image-ref: "ghcr.io/kafbat/kafka-ui:latest"
format: "table"
exit-code: "1"

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ github.token }}

- name: Download maven artifacts
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: kafbat-ui-${{ inputs.version }}
path: api/target
path: api/build/libs

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -44,9 +44,10 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-

# Build multi platform images and loading them at the same time is not possible with default container runtime : https://github.com/docker/buildx/issues/59
# Build multi-platform images and loading them at the same time is not possible with default container runtime : https://github.com/docker/buildx/issues/59
# So let's use containerd instead as it supports this option
# Also containerd is one of the option to allow preserving provenance attestations :https://docs.docker.com/build/attestations/#creating-attestations
# Also containerd is one of the option to allow preserving provenance attestations:
# https://docs.docker.com/build/attestations/#creating-attestations
- name: Setup docker with containerd
uses: crazy-max/ghaction-setup-docker@v3
with:
Expand All @@ -71,7 +72,7 @@ jobs:
tags: |
kafka-ui:temp
build-args: |
JAR_FILE=api-${{ inputs.version }}.jar
JAR_FILE=build/libs/api-${{ inputs.version }}.jar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

Expand Down
Loading
Loading