From 36044512bbe786bfe4a19122961afd37c4b5aa8c Mon Sep 17 00:00:00 2001 From: rishabh singh Date: Fri, 26 Jul 2024 16:09:28 +0530 Subject: [PATCH] Derive BACKWARD_INCOMPATIBILITY_IT_ENABLED and DRUID_PREVIOUS_IT_IMAGE_NAME env vars --- .../unit-and-integration-tests-unified.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml index b05052f0a81c..f7c5d9b9b64d 100644 --- a/.github/workflows/unit-and-integration-tests-unified.yml +++ b/.github/workflows/unit-and-integration-tests-unified.yml @@ -47,13 +47,28 @@ concurrency: env: MYSQL_DRIVER_CLASSNAME: com.mysql.jdbc.Driver # Used to set druid config in docker image for revised ITs SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 - BACKWARD_INCOMPATIBILITY_IT_ENABLED: true + #BACKWARD_INCOMPATIBILITY_IT_ENABLED: true DRUID_PREVIOUS_VERSION: 30.0.0 DRUID_PREVIOUS_VERSION_DOWNLOAD_URL: https://dlcdn.apache.org/druid/30.0.0/apache-druid-30.0.0-bin.tar.gz - DRUID_PREVIOUS_IT_IMAGE_NAME: org.apache.druid.integration-tests/test:30.0.0 + #DRUID_PREVIOUS_IT_IMAGE_NAME: org.apache.druid.integration-tests/test:30.0.0 jobs: + set-new-env-var: + name: Set new env var + runs-on: ubuntu-latest + steps: + - name: Set new environment variable + run: | + if [ -n "${{ env.DRUID_PREVIOUS_VERSION }}" ]; then + echo "export BACKWARD_INCOMPATIBILITY_IT_ENABLED=true" >> $GITHUB_ENV + else + echo "export BACKWARD_INCOMPATIBILITY_IT_ENABLED=false" >> $GITHUB_ENV + fi + echo "export DRUID_PREVIOUS_IT_IMAGE_NAME=org.apache.druid.integration-tests/test:${{ env.DRUID_PREVIOUS_VERSION }}" >> $GITHUB_ENV + echo "New environment variable: $DRUID_PREVIOUS_IT_IMAGE_NAME, $BACKWARD_INCOMPATIBILITY_IT_ENABLED" + build: + needs: set-new-env-var name: "build (jdk${{ matrix.jdk }})" strategy: fail-fast: false