You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by ab...@apache.org on 2023/05/12 05:07:06 UTC

[druid] branch master updated: Fix jdk setup in GHA (#14091)

This is an automated email from the ASF dual-hosted git repository.

abhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ef99f091a Fix jdk setup in GHA (#14091)
8ef99f091a is described below

commit 8ef99f091a730bd525c94d5b36a9d663afcf4475
Author: Tejaswini Bandlamudi <96...@users.noreply.github.com>
AuthorDate: Fri May 12 10:36:59 2023 +0530

    Fix jdk setup in GHA (#14091)
    
    Instead of downloading jdk everytime we run CI, we're using inbuilt temurin jdk distributions 8, 11, 17 by settiing JAVA_HOME variable. This is not working as expected since we were not setting this as global environment variable as a result all CI builds are running on jdk11. This PR fixes the issue.
---
 .github/workflows/reusable-revised-its.yml               |  3 ++-
 .github/workflows/reusable-standard-its.yml              |  3 ++-
 .github/workflows/reusable-unit-tests.yml                |  6 ++++--
 .github/workflows/static-checks.yml                      | 12 +++++-------
 .github/workflows/unit-and-integration-tests-unified.yml |  5 +++--
 5 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/reusable-revised-its.yml b/.github/workflows/reusable-revised-its.yml
index 4f75c9f5ba..2fdea9cfb5 100644
--- a/.github/workflows/reusable-revised-its.yml
+++ b/.github/workflows/reusable-revised-its.yml
@@ -76,7 +76,8 @@ jobs:
         uses: actions/checkout@v3
 
       - name: Setup java
-        run: export JAVA_HOME=$JAVA_HOME_${{ inputs.build_jdk }}_X64
+        run: |
+          echo "JAVA_HOME=$JAVA_HOME_${{ inputs.build_jdk }}_X64" >> $GITHUB_ENV
 
       - name: Restore Maven repository
         id: maven-restore
diff --git a/.github/workflows/reusable-standard-its.yml b/.github/workflows/reusable-standard-its.yml
index ea33489cde..f2a05a113e 100644
--- a/.github/workflows/reusable-standard-its.yml
+++ b/.github/workflows/reusable-standard-its.yml
@@ -63,7 +63,8 @@ jobs:
         uses: actions/checkout@v3
 
       - name: Setup java
-        run: export JAVA_HOME=$JAVA_HOME_${{ inputs.runtime_jdk }}_X64
+        run: |
+          echo "JAVA_HOME=$JAVA_HOME_${{ inputs.runtime_jdk }}_X64" >> $GITHUB_ENV
 
       - name: Restore Maven repository
         id: maven-restore
diff --git a/.github/workflows/reusable-unit-tests.yml b/.github/workflows/reusable-unit-tests.yml
index ca4bd441a9..5e43ccb87d 100644
--- a/.github/workflows/reusable-unit-tests.yml
+++ b/.github/workflows/reusable-unit-tests.yml
@@ -54,7 +54,8 @@ jobs:
           fetch-depth: 0
 
       - name: setup jdk${{ inputs.jdk }}
-        run: export JAVA_HOME=$JAVA_HOME_${{ inputs.jdk }}_X64
+        run: |
+          echo "JAVA_HOME=$JAVA_HOME_${{ inputs.jdk }}_X64" >> $GITHUB_ENV
 
       - name: Restore Maven repository
         id: maven-restore
@@ -98,4 +99,5 @@ jobs:
       - name: test & coverage
         env:
           MAVEN_PROJECTS: ${{ inputs.maven_projects }}
-        run: ./.github/scripts/unit_tests_script.sh
+        run: |
+          ./.github/scripts/unit_tests_script.sh
diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml
index 11f6ec8c90..dbbd892909 100644
--- a/.github/workflows/static-checks.yml
+++ b/.github/workflows/static-checks.yml
@@ -53,7 +53,8 @@ jobs:
           echo "java_version=${jdk:3}" >> $GITHUB_ENV
 
       - name: setup ${{ matrix.java }}
-        run: export JAVA_HOME=$JAVA_HOME_${{ env.java_version }}_X64
+        run: |
+          echo "JAVA_HOME=$JAVA_HOME_${{ env.java_version }}_X64" >> $GITHUB_ENV
 
       - name: packaging check
         run: |
@@ -141,12 +142,9 @@ jobs:
       - name: checkout branch
         uses: actions/checkout@v3
 
-      - name: Set up JDK 11
-        uses: actions/setup-java@v3
-        with:
-          java-version: '11'
-          distribution: 'temurin'
-          cache: maven
+      - name: setup JDK11
+        run: |
+          echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
 
       - name: setup node
         uses: actions/setup-node@v3
diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml
index 20025c3365..dd95ecb866 100644
--- a/.github/workflows/unit-and-integration-tests-unified.yml
+++ b/.github/workflows/unit-and-integration-tests-unified.yml
@@ -58,8 +58,9 @@ jobs:
       - name: Checkout branch
         uses: actions/checkout@v3
 
-      - name: Setup java
-        run: export JAVA_HOME=$JAVA_HOME_${{ matrix.jdk }}_X64
+      - name: setup jdk${{ matrix.jdk }}
+        run: |
+          echo "JAVA_HOME=$JAVA_HOME_${{ matrix.jdk }}_X64" >> $GITHUB_ENV
 
       - name: Cache Maven m2 repository
         id: maven


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org