RED-8702: Explore document databases to store entityLog
- revert gitlab pipeline changes - updated tenant-commons version
This commit is contained in:
parent
83a54159b6
commit
2c064f22a2
@ -1,4 +1,21 @@
|
||||
include:
|
||||
- project: 'gitlab/gitlab'
|
||||
ref: 'main'
|
||||
file: 'ci-templates/gradle_java.yml'
|
||||
file: 'ci-templates/gradle_java.yml'
|
||||
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- dind
|
||||
script:
|
||||
- echo "Building with gradle version ${BUILDVERSION}"
|
||||
- gradle -Pversion=${BUILDVERSION} publish
|
||||
- echo "BUILDVERSION=$BUILDVERSION" >> version.env
|
||||
artifacts:
|
||||
reports:
|
||||
dotenv: version.env
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_COMMIT_BRANCH =~ /^release/
|
||||
- if: $CI_COMMIT_TAG
|
||||
@ -24,39 +24,11 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
tasks.register("publish"){
|
||||
|
||||
}
|
||||
|
||||
tasks.named<BootBuildImage>("bootBuildImage") {
|
||||
|
||||
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
|
||||
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
|
||||
|
||||
imageName.set("nexus.knecon.com:5001/ff/${project.name}:${project.version}")
|
||||
if (project.hasProperty("buildbootDockerHostNetwork")) {
|
||||
network.set("host")
|
||||
}
|
||||
docker {
|
||||
if (project.hasProperty("buildbootDockerHostNetwork")) {
|
||||
bindHostToBuilder.set(true)
|
||||
}
|
||||
verboseLogging.set(true)
|
||||
|
||||
publishRegistry {
|
||||
username.set(providers.gradleProperty("mavenUser").getOrNull())
|
||||
password.set(providers.gradleProperty("mavenPassword").getOrNull())
|
||||
email.set(providers.gradleProperty("mavenEmail").getOrNull())
|
||||
url.set("https://nexus.knecon.com:5001/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val springBootVersion = "3.1.5"
|
||||
|
||||
dependencies {
|
||||
api("com.knecon.fforesight:tenant-commons:maverick-mongo-eval")
|
||||
api("com.knecon.fforesight:tenant-commons:0.23.0")
|
||||
api("org.liquibase:liquibase-core:4.20.0")
|
||||
api("org.liquibase.ext:liquibase-mongodb:4.20.0")
|
||||
api("org.springframework.boot:spring-boot-starter-data-mongodb:${springBootVersion}")
|
||||
|
||||
@ -1,103 +0,0 @@
|
||||
package com.knecon.fforesight.mongo.database.commons.config;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.bson.codecs.Codec;
|
||||
import org.bson.codecs.configuration.CodecRegistry;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
|
||||
import com.knecon.fforesight.mongo.database.commons.service.MongoDataSources;
|
||||
import com.mongodb.ClientSessionOptions;
|
||||
import com.mongodb.client.ClientSession;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
|
||||
//@Configuration
|
||||
public class _MultiTenantMongoDBFactory implements MongoDatabaseFactory {
|
||||
|
||||
private final MongoDataSources mongoDataSources;
|
||||
|
||||
|
||||
public _MultiTenantMongoDBFactory(MongoDataSources mongoDataSources) {
|
||||
|
||||
|
||||
this.mongoDataSources = mongoDataSources;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MongoDatabase getMongoDatabase() throws DataAccessException {
|
||||
|
||||
return mongoDataSources.mongoDatabaseCurrentTenantResolver();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MongoDatabase getMongoDatabase(String dbName) throws DataAccessException {
|
||||
|
||||
return mongoDataSources.mongoDatabaseCurrentTenantResolver();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PersistenceExceptionTranslator getExceptionTranslator() {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CodecRegistry getCodecRegistry() {
|
||||
|
||||
return MongoDatabaseFactory.super.getCodecRegistry();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasCodecFor(Class<?> type) {
|
||||
|
||||
return MongoDatabaseFactory.super.hasCodecFor(type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T> Optional<Codec<T>> getCodecFor(Class<T> type) {
|
||||
|
||||
return MongoDatabaseFactory.super.getCodecFor(type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ClientSession getSession(ClientSessionOptions options) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MongoDatabaseFactory withSession(ClientSessionOptions options) {
|
||||
|
||||
return MongoDatabaseFactory.super.withSession(options);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MongoDatabaseFactory withSession(ClientSession session) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isTransactionActive() {
|
||||
|
||||
return MongoDatabaseFactory.super.isTransactionActive();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user