From 24a9d81db7124fcf465ce317166d4b267251950b Mon Sep 17 00:00:00 2001 From: David Venable Date: Sat, 10 Feb 2024 08:24:36 -0800 Subject: [PATCH] Runs the Kafka buffer KMS tests as part of the GitHub Actions (#4041) Runs the Kafka buffer KMS tests using the DataPrepperTesting KMS key. Resolves #4040 Signed-off-by: David Venable --- .../kafka-plugin-integration-tests.yml | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kafka-plugin-integration-tests.yml b/.github/workflows/kafka-plugin-integration-tests.yml index 28fb5bdc05..ab8b3c5b79 100644 --- a/.github/workflows/kafka-plugin-integration-tests.yml +++ b/.github/workflows/kafka-plugin-integration-tests.yml @@ -14,6 +14,9 @@ on: - '*gradle*' workflow_dispatch: +permissions: + id-token: write + contents: read jobs: integration-tests: @@ -41,9 +44,28 @@ jobs: - 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@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 --tests KafkaSourceJsonTypeIT --tests KafkaBufferIT --tests KafkaBufferOTelIT + ./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*' - name: Upload Unit Test Results if: always()