Files
qqq/.circleci/config.yml
2022-06-08 15:03:33 -05:00

67 lines
1.6 KiB
YAML

version: 2.1
executors:
java17:
docker:
- image: 'cimg/openjdk:17.0'
orbs:
maven: circleci/maven@1.3.0
jobs:
maven_package:
executor: java17
steps:
# todo - ssh keys?
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
- run:
name: Build with tests
command: |
mvn clean package
- run:
name: Save test results
command: |
mkdir -p ~/test-results/junit/
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: ~/test-results
- persist_to_workspace:
root: target
paths:
- qqq-backend-core-*.jar
- store_artifacts:
path: target/qqq-backend-core-*.jar
destination: qqq-backend-core.jar
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
github_release:
executor: java17
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
- run: |
echo "working dir:"
pwd
echo "listing"
ls -l
mvn -s .circleci/mvn-settings.xml deploy -DskipTests
workflows:
main:
jobs:
- maven_package
- github_release:
requires:
- maven_package
filters:
branches:
only: circleci-project-setup ## todo - change to main