feat - kafka support #409
This file contains hidden or 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
| name: Backfill CI | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'kubernetes/**' | |
| - '**.md' | |
| - 'grafana/**' | |
| - 'prometheus/**' | |
| # cancel same workflows in progress for pull request branches | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| name: Build | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build project | |
| env: | |
| DSE_REPO_USERNAME: ${{ secrets.DSE_REPO_USERNAME }} | |
| DSE_REPO_PASSWORD: ${{ secrets.DSE_REPO_PASSWORD }} | |
| MAVEN_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m" # PHASE 1: Limit JVM memory | |
| GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false" # PHASE 1: Limit Gradle memory | |
| run: | | |
| ./gradlew -PdseRepoUsername=$DSE_REPO_USERNAME -PdseRepoPassword=$DSE_REPO_PASSWORD \ | |
| backfill-cli:build | |
| test: | |
| needs: build | |
| name: Test Backfill CLI | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| jdk: ['11'] # TODO: Enable java 17 tests https://issues.apache.org/jira/browse/CASSANDRA-16895 | |
| pulsarImage: ['datastax/lunastreaming:2.10_3.4', 'apachepulsar/pulsar:2.10.3', 'apachepulsar/pulsar:2.11.0'] | |
| cassandraFamily: ['c3', 'c4', 'dse4'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK ${{ matrix.jdk }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.jdk }} | |
| distribution: 'adopt' | |
| - name: Get project version | |
| uses: HardNorth/github-version-generate@v1.4.1 | |
| with: | |
| version-source: file | |
| version-file: gradle.properties | |
| version-file-extraction-pattern: '(?<=version=).+' | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Test with Gradle | |
| env: | |
| DSE_REPO_USERNAME: ${{ secrets.DSE_REPO_USERNAME }} | |
| DSE_REPO_PASSWORD: ${{ secrets.DSE_REPO_PASSWORD }} | |
| MAVEN_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m" # PHASE 1: Limit JVM memory | |
| GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false" # PHASE 1: Limit Gradle memory | |
| run: | | |
| set -e | |
| PREV_IFS=$IFS | |
| IFS=':' | |
| read -ra PULSAR_FULL_IMAGE <<< "${{ matrix.pulsarImage }}" | |
| IFS=$PREV_IFS | |
| PULSAR_IMAGE=${PULSAR_FULL_IMAGE[0]} | |
| PULSAR_IMAGE_TAG=${PULSAR_FULL_IMAGE[1]} | |
| ./gradlew -Pdse4 -PdseRepoUsername=$DSE_REPO_USERNAME -PdseRepoPassword=$DSE_REPO_PASSWORD \ | |
| -Papi.version=1.43 \ | |
| -PtestPulsarImage=$PULSAR_IMAGE \ | |
| -PtestPulsarImageTag=$PULSAR_IMAGE_TAG \ | |
| -PcassandraFamily=${{ matrix.cassandraFamily }} \ | |
| backfill-cli:e2eTest | |
| test-kafka: | |
| needs: build | |
| name: Test Backfill CLI (Kafka) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| jdk: ['11'] | |
| kafkaImage: ['confluentinc/cp-kafka:7.8.8', 'confluentinc/cp-kafka:7.9.7', 'confluentinc/cp-kafka:8.1.3'] | |
| cassandraFamily: ['c3', 'c4', 'dse4'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK ${{ matrix.jdk }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.jdk }} | |
| distribution: 'adopt' | |
| - name: Get project version | |
| uses: HardNorth/github-version-generate@v1.4.1 | |
| with: | |
| version-source: file | |
| version-file: gradle.properties | |
| version-file-extraction-pattern: '(?<=version=).+' | |
| - name: Cache Docker layers | |
| uses: actions/cache@v5 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Test with Gradle | |
| env: | |
| DSE_REPO_USERNAME: ${{ secrets.DSE_REPO_USERNAME }} | |
| DSE_REPO_PASSWORD: ${{ secrets.DSE_REPO_PASSWORD }} | |
| MAVEN_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m" | |
| GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false" | |
| run: | | |
| set -e | |
| ./gradlew -Pdse4 -PdseRepoUsername=$DSE_REPO_USERNAME -PdseRepoPassword=$DSE_REPO_PASSWORD \ | |
| -Papi.version=1.43 \ | |
| -PkafkaImage=${{ matrix.kafkaImage }} \ | |
| -PcassandraFamily=${{ matrix.cassandraFamily }} \ | |
| backfill-cli:e2eTestKafka |