Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 47 additions & 72 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ commands:
build-maven-java:
description: Build maven-java
steps:
- run:
- run:
name: publish m2
command: sbt codegenJava/publishM2
command: sbt publishM2
- run:
name: "Build maven-java"
command: |
Expand Down Expand Up @@ -112,6 +112,18 @@ jobs:
{ echo "[error] Code missing headers prior to commit. Run 'sbt headerCreateAll' then commit the updated code."; false; }
- save_deps_cache

validate-docs:
machine: true
description: "Validate docs"
steps:
- checkout-and-merge-to-main
- setup_sbt
- restore_deps_cache
- run:
name: Validate docs
command: make -C docs
- save_deps_cache

tests:
docker:
- image: cimg/openjdk:11.0
Expand Down Expand Up @@ -149,30 +161,14 @@ jobs:
command: sbt tck/Test/run
- save_deps_cache

validate-docs:
machine: true
description: "Validate docs"
steps:
- checkout-and-merge-to-main
- setup_sbt
- restore_deps_cache
- run:
name: Validate docs
command: make -C docs
- save_deps_cache


maven-java-tests:
machine: true
description: "Maven Java (plugin and archetype tests)"
steps:
- checkout-and-merge-to-main
- restore_deps_cache
- set-sdk-version
- setup_sbt
- run:
name: publish m2
command: sbt publishM2
- set-sdk-version
- build-maven-java
- run:
name: Run integration tests for Value Entity Archetype
Expand All @@ -198,9 +194,6 @@ jobs:
- setup_sbt
- restore_deps_cache
- set-sdk-version
- run:
name: publish m2
command: sbt publishM2
- build-maven-java
- run:
name: Run integration tests for Shopping Cart Value Entity sample
Expand Down Expand Up @@ -250,7 +243,6 @@ jobs:
command: |
cd maven-java
echo $PGP_SECRET | base64 -d | gpg --import --batch
# It seems ~/.m2 is not actually restored from the cache?
mkdir -p ~/.m2
cat >~/.m2/settings.xml \<<EOF;
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -308,83 +300,66 @@ jobs:
workflows:
CI:
jobs:
- checks:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
Comment on lines -312 to -314
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed during stand-up, we won't run the tests when tagging. That's the default behavior in CircleCI, hence the removal of this config settings.

- validate-docs
- checks
- tests:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
requires:
- checks
- validate-docs
Comment on lines +307 to +308
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only starting the tests if the basic validation passes


- integration-tests:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
requires:
- checks
- validate-docs

- tck-tests:
requires:
- checks
- validate-docs

- maven-java-tests:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
requires:
- checks
- validate-docs

- samples-tests:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
- tck-tests:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
- validate-docs:
filters: # required since publish jobs have tag filters and dependencies
tags:
only: /.*/
requires:
- checks
- validate-docs

- publish:
filters: # version tags only
tags:
only: /^v.*/
branches:
ignore: /.*/
requires:
- checks
- tests
- integration-tests
- maven-java-tests
- samples-tests
- tck-tests
- validate-docs

- publish-maven:
filters: # version tags only
tags:
only: /^v.*/
branches:
ignore: /.*/
requires:
- checks
- tests
- integration-tests
- maven-java-tests
- samples-tests
- tck-tests
- validate-docs
- publish
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only publish maven if main artifacts got published


- publish-tck:
filters: # version tags only
tags:
only: /^v.*/
branches:
ignore: /.*/
requires:
- checks
- tests
- integration-tests
- tck-tests
- validate-docs
- publish
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering why the tck is an apart publishing step. Shouldn't that be just part of the main artifacts?

Anyway, we can change on follow-up PR.

Copy link
Copy Markdown
Member Author

@octonato octonato Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind. I forgot that the TCK involves the publishing of a docker image. So, makes sense to have it's own step.


- publish-docs:
filters: # version tags only
tags:
only: /^v.*/
branches:
ignore: /.*/
requires:
- checks
- tests
- integration-tests
- tck-tests
- validate-docs
# we only publish the docs if all publishing jobs are successful, otherwise we have a 'broken' release
- publish
- publish-maven
- publish-tck