Skip to content

Commit

Permalink
Set JAVA_HOME in each stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Larusso committed Aug 29, 2023
1 parent 506d0ba commit ff7b4ff
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions vars/buildUnityWdkV3.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def call(Map configMap = [unityVersions: []]) {
UVM_AUTO_INSTALL_UNITY_EDITOR = "YES"
LOG_LEVEL = "${config.gradleArgs.logLevel}"
ATLAS_READ = credentials('artifactory_read') //needed for gradle sto read private packages
JAVA_HOME = "$JAVA_11_HOME"
}

parameters {
Expand All @@ -66,6 +65,7 @@ def call(Map configMap = [unityVersions: []]) {
}
environment {
UNITY_PACKAGE_MANAGER = 'paket'
JAVA_HOME = "${JAVA_11_HOME}"
}
steps {
script {
Expand Down Expand Up @@ -99,6 +99,7 @@ def call(Map configMap = [unityVersions: []]) {
environment {
UPM_USER_CONFIG_FILE = credentials('atlas-upm-credentials')
UNITY_PACKAGE_MANAGER = 'upm'
JAVA_HOME = "${JAVA_11_HOME}"
}
steps {
script {
Expand Down Expand Up @@ -133,6 +134,9 @@ def call(Map configMap = [unityVersions: []]) {
agent {
label "atlas && macos"
}
environment {
JAVA_HOME = "${JAVA_11_HOME}"
}
steps {
unstash 'upm_setup_w'
unstash 'paket_setup_w'
Expand Down Expand Up @@ -165,6 +169,7 @@ def call(Map configMap = [unityVersions: []]) {
environment {
UNITY_PACKAGE_MANAGER = 'upm'
UPM_USER_CONFIG_FILE = credentials('atlas-upm-credentials')
JAVA_HOME = "${JAVA_11_HOME}"
}
steps {
unstash 'upm_setup_w'
Expand Down Expand Up @@ -203,12 +208,12 @@ def call(Map configMap = [unityVersions: []]) {
steps {
script {
parallel paket: {
withEnv(["UNITY_PACKAGE_MANAGER=paket"]) {
withEnv(["UNITY_PACKAGE_MANAGER=paket", "JAVA_HOME=${JAVA_11_HOME}"]) {
parallel checkSteps(config, "paket check unity ", "paket_setup_w")
}
},
upm: {
withEnv(["UNITY_PACKAGE_MANAGER=upm"]) {
withEnv(["UNITY_PACKAGE_MANAGER=upm", "JAVA_HOME=${JAVA_11_HOME}"]) {
parallel checkSteps(config, "upm check unity ", "upm_setup_w")
}
},
Expand All @@ -231,6 +236,7 @@ def call(Map configMap = [unityVersions: []]) {
GRGIT_PASS = "${GRGIT_PSW}"
GITHUB_LOGIN = "${GRGIT_USR}"
GITHUB_PASSWORD = "${GRGIT_PSW}"
JAVA_HOME = "${JAVA_11_HOME}"
}

steps {
Expand Down

0 comments on commit ff7b4ff

Please sign in to comment.