diff --git a/.circleci/config.yml b/.circleci/config.yml index e6ec268..8f278f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,14 +3,10 @@ version: 2.1 orbs: circleci-maven-release-orb: sonatype-nexus-community/circleci-maven-release-orb@0.0.16 -executors: - new-java-maven-executor: - machine: - image: ubuntu-2204:2024.11.1 - jobs: build-and-test: - executor: new-java-maven-executor + machine: + image: ubuntu-2204:2024.11.1 steps: - run: name: Install OpenJDK 11 @@ -59,20 +55,10 @@ jobs: - store_test_results: path: ~/test-results - release: - executor: new-java-maven-executor - steps: - - run: - name: Install OpenJDK 11 - command: | - sudo apt-get update && sudo apt-get install openjdk-11-jdk - sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java - sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac - java -version - - circleci-maven-release-orb/run-maven-release: - mvn-release-perform-command: >- - mvn --batch-mode release:perform -DskipTests -s .circleci/.maven.xml - +executors: + new-java-maven-executor: + docker: + - image: cimg/openjdk:11.0.25 parameters: run_workflow_release: default: false @@ -87,4 +73,9 @@ workflows: when: << pipeline.parameters.run_workflow_release >> jobs: - build-and-test - - release \ No newline at end of file + - circleci-maven-release-orb/run-maven-release: + requires: + - build-and-test + executor: new-java-maven-executor + mvn-release-perform-command: >- + mvn --batch-mode release:perform -DskipTests -s .circleci/.maven.xml