Skip to content

Commit 010bc45

Browse files
authored
Merge pull request #141 from lightbend/rgc/fix-maven-cache-issue
2 parents 6b5f9ec + d14fefa commit 010bc45

File tree

1 file changed

+47
-72
lines changed

1 file changed

+47
-72
lines changed

.circleci/config.yml

Lines changed: 47 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ commands:
7676
build-maven-java:
7777
description: Build maven-java
7878
steps:
79-
- run:
79+
- run:
8080
name: publish m2
81-
command: sbt codegenJava/publishM2
81+
command: sbt publishM2
8282
- run:
8383
name: "Build maven-java"
8484
command: |
@@ -112,6 +112,18 @@ jobs:
112112
{ echo "[error] Code missing headers prior to commit. Run 'sbt headerCreateAll' then commit the updated code."; false; }
113113
- save_deps_cache
114114

115+
validate-docs:
116+
machine: true
117+
description: "Validate docs"
118+
steps:
119+
- checkout-and-merge-to-main
120+
- setup_sbt
121+
- restore_deps_cache
122+
- run:
123+
name: Validate docs
124+
command: make -C docs
125+
- save_deps_cache
126+
115127
tests:
116128
docker:
117129
- image: cimg/openjdk:11.0
@@ -149,30 +161,14 @@ jobs:
149161
command: sbt tck/Test/run
150162
- save_deps_cache
151163

152-
validate-docs:
153-
machine: true
154-
description: "Validate docs"
155-
steps:
156-
- checkout-and-merge-to-main
157-
- setup_sbt
158-
- restore_deps_cache
159-
- run:
160-
name: Validate docs
161-
command: make -C docs
162-
- save_deps_cache
163-
164-
165164
maven-java-tests:
166165
machine: true
167166
description: "Maven Java (plugin and archetype tests)"
168167
steps:
169168
- checkout-and-merge-to-main
170169
- restore_deps_cache
171-
- set-sdk-version
172170
- setup_sbt
173-
- run:
174-
name: publish m2
175-
command: sbt publishM2
171+
- set-sdk-version
176172
- build-maven-java
177173
- run:
178174
name: Run integration tests for Value Entity Archetype
@@ -198,9 +194,6 @@ jobs:
198194
- setup_sbt
199195
- restore_deps_cache
200196
- set-sdk-version
201-
- run:
202-
name: publish m2
203-
command: sbt publishM2
204197
- build-maven-java
205198
- run:
206199
name: Run integration tests for Shopping Cart Value Entity sample
@@ -250,7 +243,6 @@ jobs:
250243
command: |
251244
cd maven-java
252245
echo $PGP_SECRET | base64 -d | gpg --import --batch
253-
# It seems ~/.m2 is not actually restored from the cache?
254246
mkdir -p ~/.m2
255247
cat >~/.m2/settings.xml \<<EOF;
256248
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -308,83 +300,66 @@ jobs:
308300
workflows:
309301
CI:
310302
jobs:
311-
- checks:
312-
filters: # required since publish jobs have tag filters and dependencies
313-
tags:
314-
only: /.*/
303+
- validate-docs
304+
- checks
315305
- tests:
316-
filters: # required since publish jobs have tag filters and dependencies
317-
tags:
318-
only: /.*/
306+
requires:
307+
- checks
308+
- validate-docs
309+
319310
- integration-tests:
320-
filters: # required since publish jobs have tag filters and dependencies
321-
tags:
322-
only: /.*/
311+
requires:
312+
- checks
313+
- validate-docs
314+
315+
- tck-tests:
316+
requires:
317+
- checks
318+
- validate-docs
319+
323320
- maven-java-tests:
324-
filters: # required since publish jobs have tag filters and dependencies
325-
tags:
326-
only: /.*/
321+
requires:
322+
- checks
323+
- validate-docs
324+
327325
- samples-tests:
328-
filters: # required since publish jobs have tag filters and dependencies
329-
tags:
330-
only: /.*/
331-
- tck-tests:
332-
filters: # required since publish jobs have tag filters and dependencies
333-
tags:
334-
only: /.*/
335-
- validate-docs:
336-
filters: # required since publish jobs have tag filters and dependencies
337-
tags:
338-
only: /.*/
326+
requires:
327+
- checks
328+
- validate-docs
329+
339330
- publish:
340331
filters: # version tags only
341332
tags:
342333
only: /^v.*/
343334
branches:
344335
ignore: /.*/
345-
requires:
346-
- checks
347-
- tests
348-
- integration-tests
349-
- maven-java-tests
350-
- samples-tests
351-
- tck-tests
352-
- validate-docs
336+
353337
- publish-maven:
354338
filters: # version tags only
355339
tags:
356340
only: /^v.*/
357341
branches:
358342
ignore: /.*/
359343
requires:
360-
- checks
361-
- tests
362-
- integration-tests
363-
- maven-java-tests
364-
- samples-tests
365-
- tck-tests
366-
- validate-docs
344+
- publish
345+
367346
- publish-tck:
368347
filters: # version tags only
369348
tags:
370349
only: /^v.*/
371350
branches:
372351
ignore: /.*/
373352
requires:
374-
- checks
375-
- tests
376-
- integration-tests
377-
- tck-tests
378-
- validate-docs
353+
- publish
354+
379355
- publish-docs:
380356
filters: # version tags only
381357
tags:
382358
only: /^v.*/
383359
branches:
384360
ignore: /.*/
385361
requires:
386-
- checks
387-
- tests
388-
- integration-tests
389-
- tck-tests
390-
- validate-docs
362+
# we only publish the docs if all publishing jobs are successful, otherwise we have a 'broken' release
363+
- publish
364+
- publish-maven
365+
- publish-tck

0 commit comments

Comments
 (0)