Skip to content

Commit

Permalink
Use maven orb to build on CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouron committed Mar 14, 2024
1 parent 07232bf commit 978d4df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 40 deletions.
54 changes: 14 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,33 @@
version: 2.1

orbs:
maven: circleci/[email protected]

executors:
openjdk8:
docker:
- image: cimg/openjdk:8.0

jobs:
build:
executor: openjdk8

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
- v1-dependencies-

- run:
name: Build
command: mvn -s .circleci/circleci-m2-settings.xml clean install

- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
deploy:
executor: openjdk8

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
- v1-dependencies-

- run:
name: Deploy
command: mvn -s .circleci/circleci-m2-settings.xml clean deploy -P cloudsoft-release -P sonatype-release

workflows:
build-and-deploy:
jobs:
- build:
- maven/test:
name: build
executor: openjdk8
filters:
branches:
only: master
- deploy:
ignore: main
settings_file: .circleci/m2-settings.xml
- maven/test:
name: deploy
executor: openjdk8
requires:
- build
context:
- org-global
- cloudsoft-artifactory
filters:
branches:
only: master

ignore: main
settings_file: .circleci/m2-settings.xml
command: deploy -DskipTests -P cloudsoft-release -P sonatype-release
File renamed without changes.

0 comments on commit 978d4df

Please sign in to comment.