From fde8472bd074084b2b98a3e361d964b8eaa189f8 Mon Sep 17 00:00:00 2001 From: Paul Bastide Date: Mon, 28 Oct 2019 07:31:32 -0400 Subject: [PATCH] updates for build and deploy #145 Signed-off-by: Paul Bastide --- .gitignore | 5 +- docs/Build.mdx | 34 +++ fhir-coverage-reports/.gitignore | 0 fhir-coverage-reports/pom.xml | 168 ------------- .../src/main/assembly/jacoco-report.xml | 12 - fhir-coverage-reports/src/main/java/.empty | 0 .../src/main/resources/.empty | 0 fhir-coverage-reports/src/test/java/.empty | 0 .../src/test/resources/.empty | 0 fhir-examples/pom.xml | 191 ++++++++++++++ fhir-install/pom.xml | 40 +++ fhir-notification-websocket/pom.xml | 2 +- fhir-notification/pom.xml | 2 +- fhir-openapi/pom.xml | 2 +- fhir-operation-apply/pom.xml | 2 +- fhir-operation-bulkdata/pom.xml | 2 +- fhir-operation-document/pom.xml | 2 +- fhir-operation-healthcheck/pom.xml | 2 +- fhir-operation-validate/pom.xml | 2 +- fhir-operation/pom.xml | 2 +- fhir-parent/pom.xml | 189 +++++++++++++- fhir-persistence-jdbc/pom.xml | 2 +- fhir-persistence-proxy/pom.xml | 2 +- fhir-persistence-schema/pom.xml | 2 +- fhir-persistence/pom.xml | 2 +- fhir-provider/pom.xml | 2 +- fhir-registry/pom.xml | 2 +- fhir-tools/dependency-reduced-pom.xml | 238 +++++++++++++++++- fhir-tools/pom.xml | 200 ++++++++++++++- 29 files changed, 908 insertions(+), 199 deletions(-) create mode 100644 docs/Build.mdx delete mode 100644 fhir-coverage-reports/.gitignore delete mode 100644 fhir-coverage-reports/pom.xml delete mode 100644 fhir-coverage-reports/src/main/assembly/jacoco-report.xml delete mode 100644 fhir-coverage-reports/src/main/java/.empty delete mode 100644 fhir-coverage-reports/src/main/resources/.empty delete mode 100644 fhir-coverage-reports/src/test/java/.empty delete mode 100644 fhir-coverage-reports/src/test/resources/.empty diff --git a/.gitignore b/.gitignore index 3ac8639390e..e120ee7739e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,7 @@ test-output/ /pre-it-logs.zip /server-logs/ /integration-test-results/ -/integration-test-results.zip \ No newline at end of file +/integration-test-results.zip + +# Don't import pom backups +**/pom.xml.versionsBackup \ No newline at end of file diff --git a/docs/Build.mdx b/docs/Build.mdx new file mode 100644 index 00000000000..be291b5f9cb --- /dev/null +++ b/docs/Build.mdx @@ -0,0 +1,34 @@ +--- +title: Build +--- + + +This article outlines the build process from a local machine and from the build server (Travis, GitHub actions). + + +There are two + +# Build: GitHub actions + +# Build: Travis +The build with [Travis](https://travis-ci.com/IBM/FHIR) is triggered through a `push` or `pull_request` or `cron` event. The `push` is the only event which is enabled in the **IBM FHIR Server** build. + + +# Build: Local + +## Build and Deploy +``` + mvn clean install javadoc:jar javadoc:test-jar -Pdeploy-bintray,fhir-javadocs deploy -f fhir-parent/pom.xml +``` + +* Locally * The local connection to bintray takes around 30-40 minutes to build, test and deploy. + + + +# Tips +If the build appears to randomly stop complaining about a 400 error, the issue might be one of the following: + +## 1 Naming of the artifactId might include a space. +The artifactId might have a space in it. `fhir-notification-websocket ` convert to `fhir-notification-websocket` + +## 2 \ No newline at end of file diff --git a/fhir-coverage-reports/.gitignore b/fhir-coverage-reports/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fhir-coverage-reports/pom.xml b/fhir-coverage-reports/pom.xml deleted file mode 100644 index b70609643a7..00000000000 --- a/fhir-coverage-reports/pom.xml +++ /dev/null @@ -1,168 +0,0 @@ - - 4.0.0 - - com.ibm.fhir - fhir-parent - 4.0.0-SNAPSHOT - ../fhir-parent - - fhir-coverage-reports - pom - - - - ${project.groupId} - fhir-core - ${project.version} - - - ${project.groupId} - fhir-audit - ${project.version} - - - ${project.groupId} - fhir-config - ${project.version} - - - ${project.groupId} - fhir-model - ${project.version} - - - ${project.groupId} - fhir-search - ${project.version} - - - ${project.groupId} - fhir-persistence - ${project.version} - - - ${project.groupId} - fhir-persistence-proxy - ${project.version} - - - ${project.groupId} - fhir-persistence-jdbc - ${project.version} - - - ${project.groupId} - fhir-provider - ${project.version} - - - ${project.groupId} - fhir-notification - ${project.version} - - - ${project.groupId} - fhir-notification-kafka - ${project.version} - - - ${project.groupId} - fhir-notification-websocket - ${project.version} - - - ${project.groupId} - fhir-operation - ${project.version} - - - ${project.groupId} - fhir-operation-document - ${project.version} - - - ${project.groupId} - fhir-operation-validate - ${project.version} - - - ${project.groupId} - fhir-operation-healthcheck - ${project.version} - - - ${project.groupId} - fhir-database-utils - ${project.version} - - - ${project.groupId} - fhir-operation-bulkdata - ${project.version} - - - ${project.groupId} - fhir-operation-apply - ${project.version} - - - ${project.groupId} - fhir-bulkimportexport-webapp - ${project.version} - client - jar - - - ${project.groupId} - fhir-client - ${project.version} - - - ${project.groupId} - fhir-cli - ${project.version} - - - ${project.groupId} - fhir-persistence-schema - ${project.version} - - - - - - - org.jacoco - jacoco-maven-plugin - - - report-aggregate - verify - - report-aggregate - - - - - - maven-assembly-plugin - - - src/main/assembly/jacoco-report.xml - - ${project.reporting.outputDirectory} - - - - verify - - single - - - - - - - diff --git a/fhir-coverage-reports/src/main/assembly/jacoco-report.xml b/fhir-coverage-reports/src/main/assembly/jacoco-report.xml deleted file mode 100644 index 4c8e8cbabeb..00000000000 --- a/fhir-coverage-reports/src/main/assembly/jacoco-report.xml +++ /dev/null @@ -1,12 +0,0 @@ - - aggregate - - zip - - - - jacoco-aggregate - - - diff --git a/fhir-coverage-reports/src/main/java/.empty b/fhir-coverage-reports/src/main/java/.empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fhir-coverage-reports/src/main/resources/.empty b/fhir-coverage-reports/src/main/resources/.empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fhir-coverage-reports/src/test/java/.empty b/fhir-coverage-reports/src/test/java/.empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fhir-coverage-reports/src/test/resources/.empty b/fhir-coverage-reports/src/test/resources/.empty deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fhir-examples/pom.xml b/fhir-examples/pom.xml index a2ccdd6e718..39f9cbbddd4 100644 --- a/fhir-examples/pom.xml +++ b/fhir-examples/pom.xml @@ -32,4 +32,195 @@ + + + + + fhir-javadocs + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/${project.artifactId} + + --frames + + IBM Corporation]]> + false + false + + + + aggregate + + javadoc-no-fork + test-javadoc-no-fork + + site + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/${project.artifactId} + + --frames + + IBM Corporation]]> + false + false + + + + attach-javadocs + + jar + + + + + + + + + deploy-version-rc + + + + 1 + 4.0.0-rc${rc}-${maven.build.timestamp} + yyyyMMdd + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + + + + set + + clean + + * + ${deploy.version} + true + + + + + + + + + deploy-version-release + + + + 4.0.0 + yyyyMMdd-HHmm + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + + + + set + + clean + + * + ${deploy.version} + true + + + + + + + + + deploy-bintray + + + + 0 + yyyyMMdd-HHmm + ibm-fhir-server-snapshots + ibm-watson-health + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + true + true + + + ${maven.build.timestamp} + ${BUILD_ID} + ${GIT_COMMIT} + ${GIT_BRANCH} + ${GIT_URL} + + + + + + + + + + bintray-ibm-watson-health-ibm-fhir-server-snapshots + ibm-watson-health-ibm-fhir-server-snapshots + https://api.bintray.com/maven/${bintray.org}/${bintray.repo}/fhir-examples/;publish=${publish} + + + + diff --git a/fhir-install/pom.xml b/fhir-install/pom.xml index 7f68fdab835..5b8acccd767 100644 --- a/fhir-install/pom.xml +++ b/fhir-install/pom.xml @@ -75,4 +75,44 @@ + + + + aggregate-report + + + + org.jacoco + jacoco-maven-plugin + + + report-aggregate + verify + + report-aggregate + + + + + + maven-assembly-plugin + + + src/main/assembly/jacoco-report.xml + + ${project.reporting.outputDirectory} + + + + verify + + single + + + + + + + + diff --git a/fhir-notification-websocket/pom.xml b/fhir-notification-websocket/pom.xml index 30f1bbf5a6a..ae4fecdd307 100644 --- a/fhir-notification-websocket/pom.xml +++ b/fhir-notification-websocket/pom.xml @@ -8,7 +8,7 @@ ../fhir-parent - fhir-notification-websocket + fhir-notification-websocket diff --git a/fhir-notification/pom.xml b/fhir-notification/pom.xml index 1d276877f52..e8ff41d8376 100644 --- a/fhir-notification/pom.xml +++ b/fhir-notification/pom.xml @@ -4,7 +4,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-openapi/pom.xml b/fhir-openapi/pom.xml index 52d5b153ede..551c286eed1 100644 --- a/fhir-openapi/pom.xml +++ b/fhir-openapi/pom.xml @@ -5,7 +5,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-operation-apply/pom.xml b/fhir-operation-apply/pom.xml index 2a90e55a234..6811cecb650 100644 --- a/fhir-operation-apply/pom.xml +++ b/fhir-operation-apply/pom.xml @@ -6,7 +6,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-operation-bulkdata/pom.xml b/fhir-operation-bulkdata/pom.xml index f28334f938b..a9b6f84dcbb 100644 --- a/fhir-operation-bulkdata/pom.xml +++ b/fhir-operation-bulkdata/pom.xml @@ -7,7 +7,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-operation-document/pom.xml b/fhir-operation-document/pom.xml index 48d17cdbc8a..dd52198b598 100644 --- a/fhir-operation-document/pom.xml +++ b/fhir-operation-document/pom.xml @@ -6,7 +6,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-operation-healthcheck/pom.xml b/fhir-operation-healthcheck/pom.xml index 4cf12ebfa12..d5ab62be020 100644 --- a/fhir-operation-healthcheck/pom.xml +++ b/fhir-operation-healthcheck/pom.xml @@ -6,7 +6,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-operation-validate/pom.xml b/fhir-operation-validate/pom.xml index b3e6799d472..39fe873b55f 100644 --- a/fhir-operation-validate/pom.xml +++ b/fhir-operation-validate/pom.xml @@ -6,7 +6,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-operation/pom.xml b/fhir-operation/pom.xml index 0414903bf76..4b90b6f314d 100644 --- a/fhir-operation/pom.xml +++ b/fhir-operation/pom.xml @@ -6,7 +6,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-parent/pom.xml b/fhir-parent/pom.xml index 1bc4f1114c0..fdb6d78bc42 100644 --- a/fhir-parent/pom.xml +++ b/fhir-parent/pom.xml @@ -57,7 +57,6 @@ ../fhir-swagger-generator ../fhir-openapi ../fhir-install - ../fhir-coverage-reports + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/${project.artifactId} + + --frames + + IBM Corporation]]> + false + false + + + + aggregate + + javadoc-no-fork + test-javadoc-no-fork + + site + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/${project.artifactId} + + --frames + + IBM Corporation]]> + false + false + + + + attach-javadocs + + jar + + + + + + + + + deploy-version-rc + + + + 1 + 4.0.0-rc${rc}-${maven.build.timestamp} + yyyyMMdd + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + + + + set + + clean + + * + ${deploy.version} + true + + + + + + + + + deploy-version-release + + + + 4.0.0 + yyyyMMdd-HHmm + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + + + + set + + clean + + * + ${deploy.version} + true + + + + + + + + + deploy-bintray + + + + 0 + yyyyMMdd-HHmm + ibm-fhir-server-snapshots + ibm-watson-health + fhir-tools + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + true + true + + + ${maven.build.timestamp} + ${BUILD_ID} + ${GIT_COMMIT} + ${GIT_BRANCH} + ${GIT_URL} + + + + + + + + + + bintray-ibm-watson-health-ibm-fhir-server-snapshots + ibm-watson-health-ibm-fhir-server-snapshots + https://api.bintray.com/maven/${bintray.org}/${bintray.repo}/${project.artifactId}/;publish=${publish} + + + diff --git a/fhir-persistence-jdbc/pom.xml b/fhir-persistence-jdbc/pom.xml index f341eb7a40e..4c3fb85389c 100644 --- a/fhir-persistence-jdbc/pom.xml +++ b/fhir-persistence-jdbc/pom.xml @@ -8,7 +8,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-persistence-proxy/pom.xml b/fhir-persistence-proxy/pom.xml index f1a82bd4476..ce991e38b7f 100644 --- a/fhir-persistence-proxy/pom.xml +++ b/fhir-persistence-proxy/pom.xml @@ -5,7 +5,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-persistence-schema/pom.xml b/fhir-persistence-schema/pom.xml index d0d5eed9b81..506b03cc3d6 100644 --- a/fhir-persistence-schema/pom.xml +++ b/fhir-persistence-schema/pom.xml @@ -8,7 +8,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-persistence/pom.xml b/fhir-persistence/pom.xml index d3457fdcc90..f9bf99c01f0 100644 --- a/fhir-persistence/pom.xml +++ b/fhir-persistence/pom.xml @@ -6,7 +6,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-provider/pom.xml b/fhir-provider/pom.xml index 4907a99b04a..4f5d7389b00 100644 --- a/fhir-provider/pom.xml +++ b/fhir-provider/pom.xml @@ -5,7 +5,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent diff --git a/fhir-registry/pom.xml b/fhir-registry/pom.xml index 0425201b063..a418f4274b8 100644 --- a/fhir-registry/pom.xml +++ b/fhir-registry/pom.xml @@ -5,7 +5,7 @@ com.ibm.fhir fhir-parent - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 ../fhir-parent fhir-registry diff --git a/fhir-tools/dependency-reduced-pom.xml b/fhir-tools/dependency-reduced-pom.xml index 520a43019db..d69ba16890e 100644 --- a/fhir-tools/dependency-reduced-pom.xml +++ b/fhir-tools/dependency-reduced-pom.xml @@ -4,7 +4,7 @@ com.ibm.fhir fhir-tools maven-plugin - 4.0.0-SNAPSHOT + 4.0.0-rc1-20191027 @@ -135,6 +135,10 @@ true + + maven-deploy-plugin + 3.0.0-M1 + @@ -161,6 +165,9 @@ + + maven-deploy-plugin + @@ -176,6 +183,235 @@ ${env.BUILD_DISPLAY_NAME} + + fhir-javadocs + + + + maven-javadoc-plugin + 3.1.1 + + + aggregate + site + + javadoc-no-fork + test-javadoc-no-fork + + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/fhir-tools + + --frames + + Copyright 2019, <a href="http://www.ibm.com">IBM Corporation<a> + false + false + + + + attach-javadocs + + jar + + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/fhir-tools + + --frames + + Copyright 2019, <a href="http://www.ibm.com">IBM Corporation<a> + false + false + + + + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/fhir-tools + + --frames + + Copyright 2019, <a href="http://www.ibm.com">IBM Corporation<a> + false + false + + + + + + + deploy-version-rc + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + clean + + set + + + * + ${deploy.version} + true + + + + + + + + + 1 + 4.0.0-rc${rc}-${maven.build.timestamp} + yyyyMMdd + + + + deploy-version-release + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + clean + + set + + + * + ${deploy.version} + true + + + + + + + + + 4.0.0 + yyyyMMdd-HHmm + + + + deploy-bintray + + + + maven-jar-plugin + 3.1.2 + + + default-jar + package + + jar + + + + + true + true + + + 20191028-0113 + ${BUILD_ID} + ${GIT_COMMIT} + ${GIT_BRANCH} + ${GIT_URL} + + + + + + + test-jar + + + + + true + true + + + 20191028-0113 + ${BUILD_ID} + ${GIT_COMMIT} + ${GIT_BRANCH} + ${GIT_URL} + + + + + + + + + true + true + + + 20191028-0113 + ${BUILD_ID} + ${GIT_COMMIT} + ${GIT_BRANCH} + ${GIT_URL} + + + + + + + + + bintray-ibm-watson-health-ibm-fhir-server-snapshots + ibm-watson-health-ibm-fhir-server-snapshots + https://api.bintray.com/maven/${bintray.org}/${bintray.repo}/fhir-tools/;publish=0 + + + + fhir-tools + yyyyMMdd-HHmm + 0 + ibm-fhir-server-snapshots + ibm-watson-health + + diff --git a/fhir-tools/pom.xml b/fhir-tools/pom.xml index 244abea3283..497e53c3e09 100644 --- a/fhir-tools/pom.xml +++ b/fhir-tools/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.ibm.fhir - 4.0.0-SNAPSHOT + 4.0.0-SNAPSHOT/version> fhir-tools maven-plugin @@ -158,6 +158,11 @@ + + org.apache.maven.plugins + maven-deploy-plugin + 3.0.0-M1 + @@ -186,6 +191,10 @@ + + org.apache.maven.plugins + maven-deploy-plugin + @@ -277,5 +286,194 @@ ${env.BUILD_DISPLAY_NAME} + + fhir-javadocs + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/${project.artifactId} + + --frames + + IBM Corporation]]> + false + false + + + + aggregate + + javadoc-no-fork + test-javadoc-no-fork + + site + + false + none + -Xdoclint:none + 128m + 1g + + + com.ibm.fhir + + + target/apidocs/${project.artifactId} + + --frames + + IBM Corporation]]> + false + false + + + + attach-javadocs + + jar + + + + + + + + + deploy-version-rc + + + + 1 + 4.0.0-rc${rc}-${maven.build.timestamp} + yyyyMMdd + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + + + + set + + clean + + * + ${deploy.version} + true + + + + + + + + + deploy-version-release + + + + 4.0.0 + yyyyMMdd-HHmm + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + + + + set + + clean + + * + ${deploy.version} + true + + + + + + + + + deploy-bintray + + + + 0 + yyyyMMdd-HHmm + ibm-fhir-server-snapshots + ibm-watson-health + fhir-tools + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + + true + true + + + ${maven.build.timestamp} + ${BUILD_ID} + ${GIT_COMMIT} + ${GIT_BRANCH} + ${GIT_URL} + + + + + + + + + + bintray-ibm-watson-health-ibm-fhir-server-snapshots + ibm-watson-health-ibm-fhir-server-snapshots + https://api.bintray.com/maven/${bintray.org}/${bintray.repo}/fhir-tools/;publish=0 + + + +