QQQ-14 moving usr-lib-jvm cache into the install_java17 command

This commit is contained in:
2022-06-22 11:30:34 -05:00
parent 2f383fe379
commit de32291fa8

View File

@ -16,11 +16,18 @@ orbs:
commands:
install_java17:
steps:
- restore_cache:
keys:
- usr-lib-jvm
- run:
name: Install Java 17
command: |
if [ ! -e "/usr/lib/jvm/java-17-openjdk-amd64" ]; then sudo add-apt-repository -y ppa:openjdk-r/ppa && sudo apt install -y openjdk-17-jdk; else echo "java 17 already installed"; fi
sudo rm /etc/alternatives/java && sudo ln -s /usr/lib/jvm/java-17-openjdk-amd64/bin/java /etc/alternatives/java
- save_cache:
paths:
- /usr/lib/jvm/
key: usr-lib-jvm
run_maven:
parameters:
maven_subcommand:
@ -31,9 +38,6 @@ commands:
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
- restore_cache:
keys:
- usr-lib-jvm
- run:
name: Run Maven
command: |
@ -50,10 +54,6 @@ commands:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
- save_cache:
paths:
- /usr/lib/jvm/
key: usr-lib-jvm
jobs:
mvn_test: