Prepare release 2.16.0 #1
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
| # This workflow will build a Java project with Gradle | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
| name: Kafka plugin integration tests | |
| on: | |
| push: | |
| paths: | |
| - 'data-prepper-plugins/kafka-plugins/**' | |
| - '*gradle*' | |
| pull_request_target: | |
| types: [ opened, synchronize, reopened ] | |
| paths: | |
| - 'data-prepper-plugins/kafka-plugins/**' | |
| - '*gradle*' | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| integration-tests: | |
| strategy: | |
| matrix: | |
| java: [11] | |
| kafka: [2.8.1, 3.5.1] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: temurin | |
| - name: Checkout Data Prepper | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 | |
| with: | |
| add-job-summary: on-failure | |
| - name: Run Kafka Docker | |
| run: | | |
| echo 'KAFKA_VERSION=${{ matrix.kafka }}' > data-prepper-plugins/kafka-plugins/src/integrationTest/resources/kafka/.env | |
| docker compose --project-directory data-prepper-plugins/kafka-plugins/src/integrationTest/resources/kafka/zookeeper --env-file data-prepper-plugins/kafka-plugins/src/integrationTest/resources/kafka/.env up -d | |
| sleep 2 | |
| - name: Wait for Kafka | |
| run: | | |
| ./gradlew data-prepper-plugins:kafka-plugins:integrationTest -Dtests.kafka.bootstrap_servers=localhost:9092 -Dtests.kafka.authconfig.username=admin -Dtests.kafka.authconfig.password=admin --tests KafkaStartIT | |
| - name: Configure AWS credentials | |
| id: aws-credentials | |
| uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4 | |
| with: | |
| role-to-assume: ${{ secrets.TEST_IAM_ROLE_ARN }} | |
| aws-region: ${{ secrets.TEST_REGION }} | |
| output-credentials: true | |
| - name: Configure AWS default credentials | |
| run: | | |
| aws configure set default.region ${{ secrets.TEST_REGION }} | |
| aws configure set default.aws_access_key_id ${{ steps.aws-credentials.outputs.aws-access-key-id }} | |
| aws configure set default.aws_secret_access_key ${{ steps.aws-credentials.outputs.aws-secret-access-key }} | |
| aws configure set default.aws_session_token ${{ steps.aws-credentials.outputs.aws-session-token }} | |
| - name: Run Kafka integration tests | |
| run: | | |
| ./gradlew data-prepper-plugins:kafka-plugins:integrationTest \ | |
| -Dtests.kafka.bootstrap_servers=localhost:9092 \ | |
| -Dtests.kafka.authconfig.username=admin -Dtests.kafka.authconfig.password=admin \ | |
| -Dtests.kafka.kms_key=alias/DataPrepperTesting \ | |
| --tests '*kafka.buffer*' --tests KafkaSourceJsonTypeIT --tests KafkaBufferOTelIT \ | |
| --tests KafkaSinkJsonTypeIT --tests KafkaSinkPlainTextTypeIT | |
| - name: Upload Unit Test Results | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: data-prepper-kafka-integration-tests-kafka-${{ matrix.kafka }}-java-${{ matrix.java }} | |
| path: '**/test-results/**/*.xml' | |
| publish-test-results: | |
| name: "Publish Unit Tests Results" | |
| needs: integration-tests | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| path: test-results | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@b9f6c61d965bcaa18acc02d6daf706373a448f02 # v1 | |
| with: | |
| files: "test-results/**/*.xml" |