-
Notifications
You must be signed in to change notification settings - Fork 39
run publishM2 only once #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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" | ||
|
|
@@ -308,83 +300,66 @@ jobs: | |
| workflows: | ||
| CI: | ||
| jobs: | ||
| - checks: | ||
| filters: # required since publish jobs have tag filters and dependencies | ||
| tags: | ||
| only: /.*/ | ||
| - 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
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment.
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.