@@ -4,9 +4,6 @@ slack_image: &slack_image
44 auth :
55 username : $DOCKER_USERNAME
66 password : $DOCKER_PASSWORD
7-
8- orbs :
9- gradle : circleci/gradle@2.2.0
107
118work_directory : &work_directory
129 working_directory : ~/jul-jsonformatter
4340 steps :
4441 - checkout
4542 - run : sh /scripts/entry-point.sh
43+
44+ test :
45+ executor : jdk-executor
46+ steps :
47+ - checkout
48+ - attach_workspace :
49+ at : ~/jul-jsonformatter
50+ - restore_cache :
51+ keys :
52+ - v1-dependencies-{{ checksum "build.gradle" }}
53+ - v1-dependencies
54+ - run : |
55+ ./gradlew check coveralls -x test
56+ - store_test_results :
57+ path : build/test-results
58+ build :
59+ executor : jdk-executor
60+ steps :
61+ - checkout
62+ - attach_workspace :
63+ at : ~/jul-jsonformatter
64+ - restore_cache :
65+ keys :
66+ - v1-dependencies-{{ checksum "build.gradle" }}
67+ - v1-dependencies
68+ - run : |
69+ ./gradlew build publishToSonatype coveralls sonarqube -Dsnapshot=true -Dsonar.login=$SONAR_TOKEN -x test
70+ - save_cache :
71+ paths :
72+ - ~/.gradle
73+ key : v1-dependencies-{{ checksum "build.gradle" }}
74+ - store_test_results :
75+ path : build/test-results
76+ publish :
77+ executor : jdk-executor
78+ steps :
79+ - checkout
80+ - attach_workspace :
81+ at : ~/jul-jsonformatter
82+ - restore_cache :
83+ keys :
84+ - v1-dependencies-{{ checksum "build.gradle" }}
85+ - v1-dependencies
86+ - run : |
87+ ./gradlew build publishToSonatype -x test
4688
4789 notify :
4890 << : *slack_image
@@ -58,17 +100,14 @@ workflows:
58100 version : 2.1
59101 build_test :
60102 jobs :
61- - gradle/run :
62- name : build
63- executor : jdk-executor
103+ - build :
64104 context :
65105 - docker-credentials
66106 - sonatype-credentials
67107 - sonar-credentials
68108 filters :
69109 branches :
70110 only : master
71- command : build publishToSonatype coveralls sonarqube -Dsnapshot=true -Dsonar.login=$SONAR_TOKEN -x test
72111 - notify :
73112 context :
74113 - docker-credentials
@@ -77,9 +116,7 @@ workflows:
77116 - build
78117 publish_artifacts :
79118 jobs :
80- - gradle/run :
81- name : publish
82- executor : jdk-executor
119+ - publish :
83120 context :
84121 - docker-credentials
85122 - sonatype-credentials
@@ -88,7 +125,6 @@ workflows:
88125 only : non-existent-branch
89126 tags :
90127 only : /^v[0-9\.]+$/
91- command : build publishToSonatype -x test
92128 - notify :
93129 context :
94130 - docker-credentials
@@ -102,12 +138,9 @@ workflows:
102138 - docker-credentials
103139 - changelog-updater-credentials
104140 << : *pr_filter
105- - gradle/test :
106- name : test
107- executor : jdk-executor
141+ - test :
108142 context :
109143 - docker-credentials
110144 << : *pr_filter
111- test_command : check coveralls -x test
112145 requires :
113146 - changelog_updater
0 commit comments