Created
May 19, 2019 10:50
-
-
Save parj/077c4df9f72b651f66ea15f8de5b3225 to your computer and use it in GitHub Desktop.
CircleCI continuous CI job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: | |
docker: | |
# specify the version you desire here | |
- image: circleci/openjdk:11-jdk | |
# Specify service dependencies here if necessary | |
# CircleCI maintains a library of pre-built images | |
# documented at https://circleci.com/docs/2.0/circleci-images/ | |
# - image: circleci/postgres:9.4 | |
working_directory: ~/repo-11 | |
environment: | |
# Customize the JVM maximum heap limit | |
MAVEN_OPTS: -Xmx3200m | |
steps: | |
- checkout | |
# Download and cache dependencies | |
- restore_cache: | |
keys: | |
- v1-dependencies-{{ checksum "pom.xml" }} | |
# fallback to using the latest cache if no exact match is found | |
- v1-dependencies- | |
- run: mvn dependency:go-offline | |
- save_cache: | |
paths: | |
- ~/.m2 | |
key: v1-dependencies-{{ checksum "pom.xml" }} | |
- run: | |
name: Add GPG key | |
command: .travis/importKeys.sh | |
- setup_remote_docker: | |
docker_layer_caching: true | |
# run tests! | |
- run: .travis/build.sh | |
- 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 | |
- store_artifacts: | |
path: ~/test-results/junit | |
- run: | |
name: Push docker image | |
command: | | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
mvn docker:push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment