Skip to content

Bump confluent.platform.version from 7.7.0 to 7.7.1 in /aggregator #166

Bump confluent.platform.version from 7.7.0 to 7.7.1 in /aggregator

Bump confluent.platform.version from 7.7.0 to 7.7.1 in /aggregator #166

name: Build aggregator
on:
push:
branches: [ master ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: [ master ]
paths: ['aggregator/**']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Write release version
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with maven
working-directory: aggregator/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=spoud_kafka-cost-control -Pfailsafe
- name: Login to Docker Hub
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push latest
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: aggregator/
file: aggregator/src/main/docker/Dockerfile.jvm
push: true
tags: spoud/kafka-cost-control:latest
- name: Build and push tag
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: aggregator/
file: aggregator/src/main/docker/Dockerfile.jvm
push: true
tags: spoud/kafka-cost-control:${{ env.VERSION }}