You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ka...@apache.org on 2020/10/29 19:20:45 UTC
[fineract-cn-interoperation] branch develop updated (8891948 ->
6157c56)
This is an automated email from the ASF dual-hosted git repository.
kaze pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-interoperation.git.
from 8891948 interoperable - service
new fc8da1e switch maria-db to postgres
new f886691 send full url to eureka
new 5d7aaf8 update gradle to 4.10.3
new 6157c56 add docker and travis build file
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../main/resources/application.yml => Dockerfile | 25 ++++---
gradle/wrapper/gradle-wrapper.properties | 3 +-
service/src/main/resources/application.yml | 21 ++++++
shared.gradle | 27 +++++++-
travis.sh | 79 ++++++++++++++++++++++
travis.yml | 33 +++++++++
6 files changed, 174 insertions(+), 14 deletions(-)
copy service/src/main/resources/application.yml => Dockerfile (61%)
create mode 100644 travis.sh
create mode 100644 travis.yml
[fineract-cn-interoperation] 04/04: add docker and travis build file
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-interoperation.git
commit 6157c5630eecbe597c85822a4e0c5c82e66e98df
Author: Audrey Ndum <au...@gmail.com>
AuthorDate: Mon Oct 19 16:16:52 2020 +0100
add docker and travis build file
---
Dockerfile | 36 +++++++++++++++++++++++++++
shared.gradle | 21 +++++++++++++++-
travis.sh | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
travis.yml | 33 +++++++++++++++++++++++++
4 files changed, 168 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d707ff8
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+FROM openjdk:8-jdk-alpine AS builder
+RUN mkdir builddir
+COPY . builddir
+WORKDIR builddir
+RUN ./gradlew publishToMavenLocal
+
+FROM openjdk:8-jdk-alpine AS runner
+
+ARG interoperation_port=2034
+
+ENV server.max-http-header-size=16384 \
+ server.port=$interoperation_port \
+ system.initialclientid=service-runner
+
+WORKDIR /tmp
+COPY --from=builder /builddir/service/build/libs/service-0.1.0-BUILD-SNAPSHOT-boot.jar ./interoperation-service-boot.jar
+
+CMD ["java", "-jar", "interoperation-service-boot.jar"]
diff --git a/shared.gradle b/shared.gradle
index a547bcc..77efdc0 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -50,6 +50,7 @@ tasks.withType(JavaCompile) {
repositories {
jcenter()
mavenLocal()
+ maven { url 'https://mifos.jfrog.io/mifos/libs-snapshot/' }
}
dependencyManagement {
@@ -82,6 +83,22 @@ jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
+artifactory {
+ contextUrl = System.getenv("ARTIFACTORY_URL")
+ publish {
+ repository {
+ repoKey = project.findProperty('artifactoryRepoKey')
+ username = System.getenv("ARTIFACTORY_USER")
+ password = System.getenv("ARTIFACTORY_PASSWORD")
+ }
+
+ defaults {
+ publications ('api', 'componentTest', 'service', 'bootService')
+ }
+ }
+}
+artifactoryPublish.dependsOn('publishToMavenLocal')
+
license {
header rootProject.file('../HEADER')
strictCheck false
@@ -90,6 +107,7 @@ license {
xml = 'XML_STYLE'
yml = 'SCRIPT_STYLE'
yaml = 'SCRIPT_STYLE'
+ uxf = 'XML_STYLE'
}
}
@@ -102,6 +120,7 @@ rat {
"**/build/**",
"gradlew",
"gradlew.bat",
- "README.md"
+ "README.md",
+ "**/.dockerignore/**"
]
}
diff --git a/travis.sh b/travis.sh
new file mode 100644
index 0000000..d54330d
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,79 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Documentation: https://cwiki.apache.org/confluence/display/FINERACT/Fineract-CN+Artifactory
+
+#Exit immediately if a command exits with a non-zero status.
+set -e
+EXIT_STATUS=0
+
+# Builds and Publishes a SNAPSHOT
+function build_snapshot() {
+ echo -e "Building and publishing a snapshot out of branch [$TRAVIS_BRANCH]"
+ ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds a Pull Request
+function build_pullrequest() {
+ echo -e "Building pull request #$TRAVIS_PULL_REQUEST of branch [$TRAVIS_BRANCH]. Won't publish anything to Artifactory."
+ ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+}
+
+# Builds Forked (non-apache) Repository
+function build_fork() {
+ echo -e "Building branch $TRAVIS_BRANCH of fork $TRAVIS_REPO_SLUG. Won't publish anything to Artifactory."
+ ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+}
+
+# For other branches we need to add branch name as prefix
+function build_otherbranch() {
+ echo -e "Building a snapshot out of branch [$TRAVIS_BRANCH] and publishing it with prefix '${TRAVIS_BRANCH}-SNAPSHOT'"
+ ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} -PexternalVersion=${TRAVIS_BRANCH}-SNAPSHOT artifactoryPublish --stacktrace || EXIT_STATUS=$?
+}
+
+# Builds and Publishes a Tag
+function build_tag() {
+ echo -e "Building tag [$TRAVIS_TAG] and publishing it as a release"
+ ./gradlew -PartifactoryRepoKey=libs-release-local -PexternalVersion=$TRAVIS_TAG artifactoryPublish --stacktrace || EXIT_STATUS=$?
+
+}
+
+echo -e "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG"
+echo -e "TRAVIS_BRANCH=$TRAVIS_BRANCH"
+echo -e "TRAVIS_TAG=$TRAVIS_TAG"
+echo -e "TRAVIS_COMMIT=${TRAVIS_COMMIT::7}"
+echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
+
+if [[ $TRAVIS_REPO_SLUG != apache* ]]; then
+ build_fork
+elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+ build_pullrequest
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" != "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then
+ build_otherbranch
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "$BUILD_SNAPSHOTS_BRANCH" ] && [ "$TRAVIS_TAG" == "" ]; then
+ build_snapshot
+elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
+ build_tag
+else
+ echo -e "WARN: Unexpected env variable values => Branch [$TRAVIS_BRANCH], Tag [$TRAVIS_TAG], Pull Request [#$TRAVIS_PULL_REQUEST]"
+ ./gradlew clean build
+fi
+
+exit ${EXIT_STATUS}
diff --git a/travis.yml b/travis.yml
new file mode 100644
index 0000000..af12f46
--- /dev/null
+++ b/travis.yml
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+language: java
+sudo: false
+jdk:
+ - openjdk8
+install: true
+script: "./travis.sh"
+env:
+ global:
+ - BUILD_SNAPSHOTS_BRANCH=develop
+ - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
+ - ARTIFACTORY_USER=travis-ci
+ - secure: "E5IyImya7x5cHLB1vGLGIJUC1M+7RxKZivb5iUM+RR/xW39/7b4Qd3JeX4yBUeiPjf9lNMMxcGVyqI/4htT95++WCNc0u6OoxwGgxQEB9JHE8OWecaYgK4uLO7+651XF4DNbSiH3NVmc2b8Q0c0jBlu3MHAeEUIQ6BOiTXSsqnewtWAW0XETBooNmo2nTqZyKvzez0698oJuuYfZeFbqm8wJ9rIwtptyJluRzqcTlzw1cH/CvcIskLDmITVqbuZxAW59j1BqUnZNQpuOFZ692iqntdxq78CxliCG1MEYy4zWY8xcIWNVp28OKkMULXdi+V80oZXY4TyTwZfH6e2oZFz6/X9GpNNR6EwaHV0tT3wZi2NrkoBokD8bEBxQubIgxDCaDAFG9VMByC+++nwm0GJzerKBV4CpNSy/93XLrFAQ8+lOVauVtkVHuzFBWleLLQYcBGAXRz/C/UF4/m0m014jvD7vT [...]
+after_failure:
+ - ./gradlew rat
+ - cat api/build/reports/rat/rat-report.txt
[fineract-cn-interoperation] 02/04: send full url to eureka
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-interoperation.git
commit f88669116ce6c4484ea2a48ebe21134906b83290
Author: Audrey Ndum <au...@gmail.com>
AuthorDate: Mon Oct 19 07:44:45 2020 +0100
send full url to eureka
---
service/src/main/resources/application.yml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/service/src/main/resources/application.yml b/service/src/main/resources/application.yml
index 68e0269..233c048 100644
--- a/service/src/main/resources/application.yml
+++ b/service/src/main/resources/application.yml
@@ -16,11 +16,32 @@
# specific language governing permissions and limitations
# under the License.
#
+spring:
+ cloud:
+ discovery:
+ enabled: false
+ config:
+ enabled: false
+
+eureka:
+ client:
+ serviceUrl:
+ defaultZone: http://localhost:8761/eureka/
+ instance:
+ homePageUrl: "http://${eureka.hostname}:2034/interoperation/v1/"
server:
port: 2034
contextPath: /interoperation/v1/*
+postgresql:
+ driverClass: org.postgresql.Driver
+ database: seshat
+ host: localhost
+ port: 5432
+ user: postgres
+ password: postgres
+
async:
corePoolSize: 32
maxPoolSize: 16384
[fineract-cn-interoperation] 01/04: switch maria-db to postgres
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-interoperation.git
commit fc8da1ef02e832e37accdb258c2c30afe1c2562b
Author: Audrey Ndum <au...@gmail.com>
AuthorDate: Mon Oct 19 06:56:33 2020 +0100
switch maria-db to postgres
---
shared.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shared.gradle b/shared.gradle
index 9d10733..a5aeb48 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -22,7 +22,7 @@ ext.versions = [
frameworkanubis : '0.1.0-BUILD-SNAPSHOT',
frameworkapi : '0.1.0-BUILD-SNAPSHOT',
frameworklang : '0.1.0-BUILD-SNAPSHOT',
- frameworkmariadb : '0.1.0-BUILD-SNAPSHOT',
+ frameworkpostgresql: '0.1.0-BUILD-SNAPSHOT',
frameworkcassandra : '0.1.0-BUILD-SNAPSHOT',
frameworkcommand : '0.1.0-BUILD-SNAPSHOT',
frameworktest : '0.1.0-BUILD-SNAPSHOT',
[fineract-cn-interoperation] 03/04: update gradle to 4.10.3
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-interoperation.git
commit 5d7aaf828e45cdd6a3de8fc8c0911dcb0df31818
Author: Audrey Ndum <au...@gmail.com>
AuthorDate: Mon Oct 19 13:49:33 2020 +0100
update gradle to 4.10.3
---
gradle/wrapper/gradle-wrapper.properties | 3 ++-
shared.gradle | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index e2f405e..631e9e1 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
+
diff --git a/shared.gradle b/shared.gradle
index a5aeb48..a547bcc 100644
--- a/shared.gradle
+++ b/shared.gradle
@@ -67,7 +67,9 @@ ext['spring-data-releasetrain.version'] = 'Gosling-SR2A'
dependencies {
compile(
- [group: 'com.google.code.findbugs', name: 'jsr305']
+ [group: 'com.google.code.findbugs', name: 'jsr305'],
+ [group: 'org.apache.fineract.cn', name: 'postgresql', version: versions.frameworkpostgresql],
+ [group: 'postgresql', name: 'postgresql', version: '9.0-801.jdbc4']
)
testCompile(