Skip to content

Commit be16aec

Browse files
committed
Added circle ci v2 configuration
(29)
1 parent 9112ceb commit be16aec

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.circleci/config.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/code
5+
docker:
6+
- image: circleci/openjdk:8-jdk-node-browsers
7+
environment:
8+
JVM_OPTIONS: -Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M
9+
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx3840m -XX:+HeapDumpOnOutOfMemoryError"'
10+
steps:
11+
- checkout
12+
- restore_cache:
13+
key: jars-{{ checksum "build.gradle" }}-{{ checksum "build.gradle" }}
14+
# - run:
15+
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
16+
# command: sudo chmod +x ./gradlew
17+
- run:
18+
name: Download Dependencies
19+
command: ./gradlew dependencies
20+
- run:
21+
name: pre-dependencies
22+
command: npm install codecov
23+
- save_cache:
24+
paths:
25+
- ~/node_modules
26+
- ~/.m2
27+
- ~/.gradle
28+
key: jars-{{ checksum "build.gradle" }}-{{ checksum "build.gradle" }}
29+
- run:
30+
name: Run Tests
31+
command: ./gradlew clean build jacocoTestReport --no-daemon
32+
no_output_timeout: 900s
33+
environment:
34+
_JAVA_OPTIONS: -Xmx1024M -XX:ReservedCodeCacheSize=512M
35+
- run:
36+
name: Post test
37+
command: ./node_modules/.bin/codecov
38+
- run:
39+
name: Save test results
40+
command: |
41+
mkdir -p ~/junit/
42+
mkdir -p ~/reports/
43+
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
44+
cp -R swagger-grails-contract-tests/build/reports/tests ~/reports
45+
when: always
46+
- store_test_results:
47+
path: ~/junit
48+
- store_test_results:
49+
path: ~/reports
50+
- store_artifacts:
51+
path: ~/junit
52+
- store_artifacts:
53+
path: ~/reports
54+
- deploy:
55+
command: |
56+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
57+
./gradlew artifactoryPublish -x check
58+
fi
59+
notify:
60+
webhooks:
61+
- url: https://webhooks.gitter.im/e/b30a7db820817acfc6d8

0 commit comments

Comments
 (0)