From 440212c5f991faa3450c77a93c3af847836f5e6e Mon Sep 17 00:00:00 2001 From: Tejaswini Bandlamudi <96047043+tejaswini-imply@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:02:57 +0530 Subject: [PATCH] Fix GHA workflow maven build erroring incase of version updates (#13735) * build maven sequentially * run mvn tests in offline mode after retrieving cache --- .github/workflows/reusable-standard-its.yml | 2 +- .github/workflows/reusable-unit-tests.yml | 2 +- it.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-standard-its.yml b/.github/workflows/reusable-standard-its.yml index a2467d6c271..4e9ffa58436 100644 --- a/.github/workflows/reusable-standard-its.yml +++ b/.github/workflows/reusable-standard-its.yml @@ -78,7 +78,7 @@ jobs: - name: Run IT env: MYSQL_DRIVER_CLASSNAME: ${{ inputs.mysql_driver }} - MVN: ${{ format('{0} {1}', env.MVN, (steps.maven-restore.outputs.cache-hit && 'dependency:go-offline' || '-U')) }} + MVN: ${{ format('{0} {1}', env.MVN, (steps.maven-restore.outputs.cache-hit && '-o' || '-U')) }} run: | # Debug echo echo "Mysql driver: ${MYSQL_DRIVER_CLASSNAME}" diff --git a/.github/workflows/reusable-unit-tests.yml b/.github/workflows/reusable-unit-tests.yml index 1684a5fe570..1bbff44b30d 100644 --- a/.github/workflows/reusable-unit-tests.yml +++ b/.github/workflows/reusable-unit-tests.yml @@ -91,5 +91,5 @@ jobs: - name: test & coverage env: MAVEN_PROJECTS: ${{ inputs.maven_projects }} - MVN: ${{ format('{0} {1}', env.MVN, (steps.maven-restore.outputs.cache-hit && 'dependency:go-offline' || '-U')) }} + MVN: ${{ format('{0} {1}', env.MVN, (steps.maven-restore.outputs.cache-hit && '-o' || '-U')) }} run: ./.github/scripts/unit_tests_script.sh diff --git a/it.sh b/it.sh index 7fb3889b559..bf66ea71778 100755 --- a/it.sh +++ b/it.sh @@ -194,7 +194,7 @@ case $CMD in usage ;; "ci" ) - mvn -q clean package dependency:go-offline -P dist $MAVEN_IGNORE -T1.0C + mvn -q clean package dependency:go-offline -P dist $MAVEN_IGNORE ;; "build" ) mvn clean package -P dist $MAVEN_IGNORE -T1.0C