Skip to content

Commit

Permalink
Enable Travis Tag Release for the FHIR Repository #145
Browse files Browse the repository at this point in the history
- updates to automation
- add bintray as a specific settings in the pom.xmls
- update name

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
  • Loading branch information
prb112 committed Oct 15, 2019
1 parent 6f8a96c commit 9b35f7d
Show file tree
Hide file tree
Showing 43 changed files with 646 additions and 57 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ test-output/
/server-logs/
/integration-test-results/
/integration-test-results.zip

# Avoid picking up backup files.
**/pom.xml.versionsBackup
35 changes: 0 additions & 35 deletions build/bintray-config.template

This file was deleted.

35 changes: 35 additions & 0 deletions build/bintray/config.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"package": {
"vcs_url": "https://github.com/IBM/FHIR.git",
"repo": "${BINTRAY_REPO_NAME}",
"issue_tracker_url": "https://github.com/IBM/FHIR/issues",
"subject": "${BINTRAY_REPO_OWNER}",
"website_url": "https://github.com/IBM/FHIR",
"name": "${BINTRAY_PKG_NAME}"
},

"version": {
"name": "${BINTRAY_VERSION}"
},

"files": [
{
"includePattern": "${MODULE}/target/${MODULE}.jar",
"uploadPattern": "${BINTRAY_PATH}/${MODULE}.jar"
},
{
"includePattern": "${MODULE}/target/${MODULE}-sources.jar",
"uploadPattern": "${BINTRAY_PATH}/${MODULE}-sources.jar"
},
{
"includePattern": "${MODULE}/target/${MODULE}-javadoc.jar",
"uploadPattern": "${BINTRAY_PATH}/${MODULE}-javadoc.jar"
},
{
"includePattern": "${MODULE}/pom.xml",
"uploadPattern": "${BINTRAY_PATH}/${MODULE}.pom"
}
],

"publish": true
}
41 changes: 41 additions & 0 deletions build/bintray/setup-modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

# Sets up the details for bintray modules/packages on BinTray
# You must set to use your API Key and API user in the curl request.
# BINTRAY_USER=change-me
# BINTRAY_PASSWORD=change-me

BINTRAY_REPO_OWNER=ibm-watson-health
BINTRAY_REPO_NAME=ibm-fhir-server-snapshots
BINTRAY_VERSION=4.0.0

PKGS=("fhir-tools" "fhir-examples" "fhir-core" "fhir-task-api" "fhir-task-core" "fhir-database-utils" "fhir-config" "fhir-audit" "fhir-model" "fhir-validation" "fhir-registry" "fhir-ig-us-core" "fhir-persistence" "fhir-replication-api" "fhir-persistence-proxy" "fhir-persistence-schema" "fhir-persistence-jdbc" "fhir-provider" "fhir-operation" "fhir-operation-validate" "fhir-operation-document" "fhir-operation-healthcheck" "fhir-operation-apply" "fhir-operation-bulkdata" "fhir-bulkimportexport-webapp" "fhir-search" "fhir-client" "fhir-cli" "fhir-notification" "fhir-notification-kafka" "fhir-notification-websocket" "fhir-server" "fhir-server-webapp" "fhir-server-test" "fhir-swagger-generator" "fhir-openapi" "fhir-install" "fhir-coverage-reports" "fhir-parent")

# If you need to create a single module, then do something like the following.
# PKGS=( "fhir-parent" )
for BINTRAY_PKG_NAME in ${PKGS[@]}
do
echo ${BINTRAY_PKG_NAME}

# Setup the JSON Data
JSON_DATA=`
cat << EOF
{
"name": "${BINTRAY_PKG_NAME}",
"desc": "This package is part of the IBM FHIR Server project.",
"labels": ["ibm-fhir-server", "fhir"],
"licenses": ["Apache-2.0"],
"custom_licenses": [],
"vcs_url": "https://github.com/IBM/FHIR.git",
"website_url": "http://ibm.github.io/FHIR",
"issue_tracker_url": "https://github.com/IBM/FHIR/issues",
"github_repo": "IBM/FHIR",
"public_download_numbers": false,
"public_stats": false
}
EOF
`

curl -XPOST -u${BINTRAY_USER}:${BINTRAY_PASSWORD} https://api.bintray.com/packages/ibm-watson-health/ibm-fhir-server-snapshots/ --data "${JSON_DATA}" -H "Content-Type: application/json"

done
2 changes: 1 addition & 1 deletion fhir-audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
<artifactId>jackson-annotations</artifactId>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-bulkimportexport-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,5 @@
</plugin>
</plugins>
</build>

</project>
1 change: 1 addition & 0 deletions fhir-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@
</plugin>
</plugins>
</build>

</project>
1 change: 1 addition & 0 deletions fhir-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
<artifactId>gson</artifactId>
</dependency>
</dependencies>

</project>
2 changes: 1 addition & 1 deletion fhir-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
<scope>test</scope>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-coverage-reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,5 @@
</plugin>
</plugins>
</build>

</project>
1 change: 1 addition & 0 deletions fhir-database-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@
<scope>test</scope>
</dependency>
</dependencies>

</project>
126 changes: 126 additions & 0 deletions fhir-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,132 @@
<skip>true</skip>
</configuration>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>deploy-version-rc</id>
<!-- This profile enables automation to change version and DEPLOY
rc to bintray. There are one input values. mvn clean -Drc=1 -Pdeploy-version-rc
-f fhir-examples/pom.xml -->
<properties>
<!-- the version to be set -->
<rc>1</rc>
<deploy.version>4.0.0-rc${rc}-${maven.build.timestamp}</deploy.version>
<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
</configuration>
<executions>
<execution>
<goals>
<goal>set</goal>
</goals>
<phase>clean</phase>
<configuration>
<oldVersion>*</oldVersion>
<newVersion>${deploy.version}</newVersion>
<generateBackupPoms>true</generateBackupPoms>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy-version-release</id>
<!-- This profile enables automation to change version and DEPLOY
release to bintray. There are one input values. mvn clean -Drc=1 -Pdeploy-version-release
-f fhir-examples/pom.xml -->
<properties>
<!-- the version to be set -->
<deploy.version>4.0.0</deploy.version>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
</configuration>
<executions>
<execution>
<goals>
<goal>set</goal>
</goals>
<phase>clean</phase>
<configuration>
<oldVersion>*</oldVersion>
<newVersion>${deploy.version}</newVersion>
<generateBackupPoms>true</generateBackupPoms>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy-bintray</id>
<!-- This profile enables automation DEPLOY to bintray. There
are three input values. mvn clean install deploy -Pdeploy-bintray -f fhir-examples/pom.xml -->
<properties>
<!-- switch to 1 to publish automatically -Dpublish=1 -->
<publish>0</publish>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
<bintray.repo>ibm-fhir-server-snapshots</bintray.repo>
<bintray.org>ibm-watson-health</bintray.org>
</properties>

<build>
<plugins>
<plugin>
<!-- Do not move this up to top level as it'll cause
a conflict with m2e restrictions on v2.6 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Build-Time>${maven.build.timestamp}</Build-Time>
<Build-Number>${BUILD_ID}</Build-Number>
<Git-Commit>${GIT_COMMIT}</Git-Commit>
<Git-Branch>${GIT_BRANCH}</Git-Branch>
<Git-URL>${GIT_URL}</Git-URL>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>bintray-ibm-watson-health-ibm-fhir-server-snapshots</id>
<name>ibm-watson-health-ibm-fhir-server-snapshots</name>
<url>https://api.bintray.com/maven/${bintray.org}/${bintray.repo}/fhir-examples/;publish=${publish}</url>
</repository>
</distributionManagement>

</profile>

</profiles>
</project>
1 change: 1 addition & 0 deletions fhir-ig-us-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
<scope>test</scope>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-install/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@
</plugin>
</plugins>
</build>

</project>
2 changes: 1 addition & 1 deletion fhir-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
</plugins>
</pluginManagement>
</build>

</project>
1 change: 1 addition & 0 deletions fhir-notification-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
<artifactId>kafka-clients</artifactId>
</dependency>
</dependencies>

</project>
3 changes: 2 additions & 1 deletion fhir-notification-websocket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<relativePath>../fhir-parent</relativePath>
</parent>

<artifactId>fhir-notification-websocket </artifactId>
<artifactId>fhir-notification-websocket</artifactId>

<dependencies>
<dependency>
Expand All @@ -21,4 +21,5 @@
<artifactId>javax.websocket-api</artifactId>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-notification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
<scope>provided</scope>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-openapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
</plugin>
</plugins>
</build>

</project>
1 change: 1 addition & 0 deletions fhir-operation-apply/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-operation-bulkdata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
<scope>test</scope>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-operation-document/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-operation-healthcheck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
1 change: 1 addition & 0 deletions fhir-operation-validate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit 9b35f7d

Please sign in to comment.