Fix GHA workflow maven build erroring incase of version updates (#13735)

* build maven sequentially

* run mvn tests in offline mode after retrieving cache
This commit is contained in:
Tejaswini Bandlamudi 2023-02-02 10:02:57 +05:30 committed by GitHub
parent 7c188d80b8
commit 440212c5f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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}"

View File

@ -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

2
it.sh
View File

@ -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