Commit 0d00c634 authored by Cheremnov Dmitriy's avatar Cheremnov Dmitriy
Browse files

Merge branch 'master' into 'master'

From pro-sd/pro-sd-ump:master into public-group/pro-sd-ump:master

See merge request !26
parents 0a55565f 88c9982a
Pipeline #287 canceled with stages
# UMP CI/CD pipeline.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/README.html#stages
cache:
key: $CI_COMMIT_REF_SLUG
before_script:
- docker info
variables:
UMP_GATEWAY_HC_VERSION: "0.1.0"
UMP_MS_HC_VERSION: "0.1.0"
UMP_ENVIRONMENT_STAGING: "staging"
UMP_NAMESPACE_STAGING: "ump"
UMP_MS_DOCUMENTATION: "documentation"
stages: # List of stages for jobs, and their order of execution
- build
- verify
- test
- delivery
- deploy
- management
build-job: # This job runs in the build stage, which runs first.
stage: build
script:
- echo $CI_COMMIT_REF_SLUG
- echo "Compiling the code..."
- mvn clean package -P integration -f ./ump/pom.xml -D maven.test.skip=true
- echo "Compile completed."
except:
- staging
checkstyle-job: # This job also runs in the verify stage.
stage: verify # It only starts when the job in the build stage completes successfully.
script:
- echo "Verifing code style..."
- mvn verify -P integration -f ./ump/pom.xml -D maven.test.skip=true -D pmd.skip=true
- echo "Code style successfully verified."
except:
- staging
pmd-job: # This job also runs in the verify stage.
stage: verify # It only starts when the job in the build stage completes successfully.
script:
- echo "Verifing PMD..."
- mvn verify -P integration -f ./ump/pom.xml -D maven.test.skip=true -D checkstyle.skip=true
- echo "PMD successfully verified."
except:
- staging
junit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
script:
- echo "Running unit and integration tests..."
- mvn verify -P integration -f ./ump/pom.xml -D checkstyle.skip=true -D pmd.skip=true
- echo "Unit and integration tests completed."
artifacts:
when: always
paths:
- ump/ump-sqldbclient-lib/target/surefire-reports/TEST-*.xml
- ump/ump-restapi-lib/target/surefire-reports/TEST-*.xml
- ump/ump-restapiserver-lib/target/surefire-reports/TEST-*.xml
- ump/ump-gitlabio-api/target/surefire-reports/TEST-*.xml
- ump/ump-config-ms/target/surefire-reports/TEST-*.xml
- ump/ump-templatemanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-filemanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-templatemanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-emailio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-smsio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-gitlabio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-mattermostio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-workflowmanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-currencymanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-workschedule-ms/target/surefire-reports/TEST-*.xml
- ump/ump-quiz-ms/target/surefire-reports/TEST-*.xml
reports:
junit:
- ump/ump-sqldbclient-lib/target/surefire-reports/TEST-*.xml
- ump/ump-restapi-lib/target/surefire-reports/TEST-*.xml
- ump/ump-restapiserver-lib/target/surefire-reports/TEST-*.xml
- ump/ump-gitlabio-api/target/surefire-reports/TEST-*.xml
- ump/ump-config-ms/target/surefire-reports/TEST-*.xml
- ump/ump-templatemanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-filemanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-templatemanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-emailio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-smsio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-gitlabio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-mattermostio-ms/target/surefire-reports/TEST-*.xml
- ump/ump-workflowmanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-currencymanager-ms/target/surefire-reports/TEST-*.xml
- ump/ump-workschedule-ms/target/surefire-reports/TEST-*.xml
- ump/ump-quiz-ms/target/surefire-reports/TEST-*.xml
except:
- staging
delivery-job: # This job runs in the delivery stage.
stage: delivery # It only for master runs when *both* jobs in the test stage complete successfully.
script:
- echo "Delivering artifacts..."
- mvn deploy -P integration -f ./ump/pom.xml -s ${SETTINGS_XML} -D maven.test.skip=true
- echo "Artifacts successfully delivered."
only:
- master
.base-gateway-deploy-job:
stage: deploy
script:
- echo "Deploing gateway to ${UMP_NAMESPACE} k8s..."
- helm repo update
- export UMP_GATEWAY_VERSION=$(kubectl get pods --namespace ${UMP_NAMESPACE} -l "app.kubernetes.io/name=ump-gateway-hc,app.kubernetes.io/instance=gateway" -o jsonpath="{.items[0].metadata.annotations.ump\.k8s\.asvoip\.com\/version}")
- export UMP_GATEWAY_NEW_VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q -f ump/ump-gateway-ms/pom.xml)
- echo "Variables - UMP_GATEWAY_HC_VERSION = ${UMP_GATEWAY_HC_VERSION}, UMP_GATEWAY_VERSION = ${UMP_GATEWAY_VERSION}, UMP_GATEWAY_NEW_VERSION = ${UMP_GATEWAY_NEW_VERSION}"
- if [[ ! ${UMP_GATEWAY_VERSION} && ${UMP_GATEWAY_NEW_VERSION} ]]; then helm install gateway asvoip-helm-hosted/ump-gateway-hc -n ${UMP_NAMESPACE} --set ingress.enabled=true --set appVersion=${UMP_GATEWAY_NEW_VERSION} --version ${UMP_GATEWAY_HC_VERSION}; else echo "'${UMP_GATEWAY_VERSION}' version exists (or there was an error). Install skipped."; fi
- if [[ ${UMP_GATEWAY_VERSION} && ${UMP_GATEWAY_NEW_VERSION} && ${UMP_GATEWAY_NEW_VERSION} != ${UMP_GATEWAY_VERSION} ]]; then helm upgrade gateway asvoip-helm-hosted/ump-gateway-hc -n ${UMP_NAMESPACE} --set ingress.enabled=true --set appVersion=${UMP_GATEWAY_NEW_VERSION} --version ${UMP_GATEWAY_HC_VERSION}; else echo "'${UMP_GATEWAY_VERSION}' version has not changed (or there was an error). Upgrade skipped."; fi
environment:
name: ${UMP_ENVIRONMENT}
url: https://${UMP_NAMESPACE}.k8s.asvoip.com/actuator/health
kubernetes:
namespace: ${UMP_NAMESPACE}
.base-ms-deploy-job:
stage: deploy
script:
- echo "Deploing MicroService ${UMP_MS} to ${UMP_NAMESPACE} k8s..."
- helm repo update
- export UMP_MS_VERSION=$(kubectl get pods --namespace ${UMP_NAMESPACE} -l "app.kubernetes.io/name=ump-ms-hc,app.kubernetes.io/instance=${UMP_MS}" -o jsonpath="{.items[0].metadata.annotations.ump\.k8s\.asvoip\.com\/version}")
- export UMP_MS_NEW_VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q -f ump/ump-${UMP_MS}-ms/pom.xml)
- echo "Variables - UMP_MS_HC_VERSION = ${UMP_MS_HC_VERSION}, UMP_MS_VERSION = ${UMP_MS_VERSION}, UMP_MS_NEW_VERSION = ${UMP_MS_NEW_VERSION}"
- if [[ ! ${UMP_MS_VERSION} && ${UMP_MS_NEW_VERSION} ]]; then helm install ${UMP_MS} asvoip-helm-hosted/ump-ms-hc -n ${UMP_NAMESPACE} --set image.repository=registry.k8s.asvoip.com/ump-${UMP_MS}-ms --set appVersion=${UMP_MS_NEW_VERSION} --version ${UMP_MS_HC_VERSION}; else echo "'${UMP_MS_VERSION}' version exists (or there was an error). Install skipped."; fi
- if [[ ${UMP_MS_VERSION} && ${UMP_MS_NEW_VERSION} && ${UMP_MS_NEW_VERSION} != ${UMP_MS_VERSION} ]]; then helm upgrade ${UMP_MS} asvoip-helm-hosted/ump-ms-hc -n ${UMP_NAMESPACE} --set image.repository=registry.k8s.asvoip.com/ump-${UMP_MS}-ms --set appVersion=${UMP_MS_NEW_VERSION} --version ${UMP_MS_HC_VERSION}; else echo "'${UMP_MS_VERSION}' version has not changed (or there was an error). Upgrade skipped."; fi
environment:
name: ${UMP_ENVIRONMENT}
url: https://${UMP_NAMESPACE}.k8s.asvoip.com/${UMP_MS}/actuator/health
kubernetes:
namespace: ${UMP_NAMESPACE}
staging-gateway-deploy-job:
extends: .base-gateway-deploy-job
variables:
UMP_ENVIRONMENT: ${UMP_ENVIRONMENT_STAGING}
UMP_NAMESPACE: ${UMP_NAMESPACE_STAGING}
only:
- staging
staging-documentation-deploy-job:
extends: .base-ms-deploy-job
variables:
UMP_ENVIRONMENT: ${UMP_ENVIRONMENT_STAGING}
UMP_NAMESPACE: ${UMP_NAMESPACE_STAGING}
UMP_MS: ${UMP_MS_DOCUMENTATION}
only:
- staging
.base-gateway-install-job:
stage: management
script:
- echo "Installing gateway to ${UMP_NAMESPACE} k8s..."
- helm repo update
- export UMP_GATEWAY_VERSION=$(kubectl get pods --namespace ${UMP_NAMESPACE} -l "app.kubernetes.io/name=ump-gateway-hc,app.kubernetes.io/instance=gateway" -o jsonpath="{.items[0].metadata.annotations.ump\.k8s\.asvoip\.com\/version}")
- export UMP_GATEWAY_NEW_VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q -f ump/ump-gateway-ms/pom.xml)
- echo "Variables - UMP_GATEWAY_HC_VERSION = ${UMP_GATEWAY_HC_VERSION}, UMP_GATEWAY_VERSION = ${UMP_GATEWAY_VERSION}, UMP_GATEWAY_NEW_VERSION = ${UMP_GATEWAY_NEW_VERSION}"
- if [[ ! ${UMP_GATEWAY_VERSION} && ${UMP_GATEWAY_NEW_VERSION} ]]; then helm install gateway asvoip-helm-hosted/ump-gateway-hc -n ${UMP_NAMESPACE} --set ingress.enabled=true --set appVersion=${UMP_GATEWAY_NEW_VERSION} --version ${UMP_GATEWAY_HC_VERSION}; else echo "'${UMP_GATEWAY_VERSION}' version exists (or there was an error). Install skipped."; fi
environment:
name: ${UMP_ENVIRONMENT}
url: https://${UMP_NAMESPACE}.k8s.asvoip.com/actuator/health
kubernetes:
namespace: ${UMP_NAMESPACE}
when: manual
.base-gateway-upgrade-job:
stage: management
script:
- echo "Upgrading gateway to ${UMP_NAMESPACE} k8s..."
- helm repo update
- export UMP_GATEWAY_VERSION=$(kubectl get pods --namespace ${UMP_NAMESPACE} -l "app.kubernetes.io/name=ump-gateway-hc,app.kubernetes.io/instance=gateway" -o jsonpath="{.items[0].metadata.annotations.ump\.k8s\.asvoip\.com\/version}")
- export UMP_GATEWAY_NEW_VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q -f ump/ump-gateway-ms/pom.xml)
- echo "Variables - UMP_GATEWAY_HC_VERSION = ${UMP_GATEWAY_HC_VERSION}, UMP_GATEWAY_VERSION = ${UMP_GATEWAY_VERSION}, UMP_GATEWAY_NEW_VERSION = ${UMP_GATEWAY_NEW_VERSION}"
- if [[ ${UMP_GATEWAY_VERSION} && ${UMP_GATEWAY_NEW_VERSION} && ${UMP_GATEWAY_NEW_VERSION} != ${UMP_GATEWAY_VERSION} ]]; then helm upgrade gateway asvoip-helm-hosted/ump-gateway-hc -n ${UMP_NAMESPACE} --set ingress.enabled=true --set appVersion=${UMP_GATEWAY_NEW_VERSION} --version ${UMP_GATEWAY_HC_VERSION}; else echo "'${UMP_GATEWAY_VERSION}' version has not changed (or there was an error). Upgrade skipped."; fi
environment:
name: ${UMP_ENVIRONMENT}
url: https://${UMP_NAMESPACE}.k8s.asvoip.com/actuator/health
kubernetes:
namespace: ${UMP_NAMESPACE}
when: manual
.base-ms-install-job:
stage: management
script:
- echo "Installing MicroService ${UMP_MS} to ${UMP_NAMESPACE} k8s..."
- helm repo update
- export UMP_MS_VERSION=$(kubectl get pods --namespace ${UMP_NAMESPACE} -l "app.kubernetes.io/name=ump-ms-hc,app.kubernetes.io/instance=${UMP_MS}" -o jsonpath="{.items[0].metadata.annotations.ump\.k8s\.asvoip\.com\/version}")
- export UMP_MS_NEW_VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q -f ump/ump-${UMP_MS}-ms/pom.xml)
- echo "Variables - UMP_MS_HC_VERSION = ${UMP_MS_HC_VERSION}, UMP_MS_VERSION = ${UMP_MS_VERSION}, UMP_MS_NEW_VERSION = ${UMP_MS_NEW_VERSION}"
- if [[ ! ${UMP_MS_VERSION} && ${UMP_MS_NEW_VERSION} ]]; then helm install ${UMP_MS} asvoip-helm-hosted/ump-ms-hc -n ${UMP_NAMESPACE} --set image.repository=registry.k8s.asvoip.com/ump-${UMP_MS}-ms --set appVersion=${UMP_MS_NEW_VERSION} --version ${UMP_MS_HC_VERSION}; else echo "'${UMP_MS_VERSION}' version exists (or there was an error). Install skipped."; fi
environment:
name: ${UMP_ENVIRONMENT}
url: https://${UMP_NAMESPACE}.k8s.asvoip.com/${UMP_MS}/actuator/health
kubernetes:
namespace: ${UMP_NAMESPACE}
when: manual
.base-ms-upgrade-job:
stage: management
script:
- echo "Upgrading MicroService ${UMP_MS} to ${UMP_NAMESPACE} k8s..."
- helm repo update
- export UMP_MS_VERSION=$(kubectl get pods --namespace ${UMP_NAMESPACE} -l "app.kubernetes.io/name=ump-ms-hc,app.kubernetes.io/instance=${UMP_MS}" -o jsonpath="{.items[0].metadata.annotations.ump\.k8s\.asvoip\.com\/version}")
- export UMP_MS_NEW_VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q -f ump/ump-${UMP_MS}-ms/pom.xml)
- echo "Variables - UMP_MS_HC_VERSION = ${UMP_MS_HC_VERSION}, UMP_MS_VERSION = ${UMP_MS_VERSION}, UMP_MS_NEW_VERSION = ${UMP_MS_NEW_VERSION}"
- if [[ ${UMP_MS_VERSION} && ${UMP_MS_NEW_VERSION} && ${UMP_MS_NEW_VERSION} != ${UMP_MS_VERSION} ]]; then helm upgrade ${UMP_MS} asvoip-helm-hosted/ump-ms-hc -n ${UMP_NAMESPACE} --set image.repository=registry.k8s.asvoip.com/ump-${UMP_MS}-ms --set appVersion=${UMP_MS_NEW_VERSION} --version ${UMP_MS_HC_VERSION}; else echo "'${UMP_MS_VERSION}' version has not changed (or there was an error). Upgrade skipped."; fi
environment:
name: ${UMP_ENVIRONMENT}
url: https://${UMP_NAMESPACE}.k8s.asvoip.com/${UMP_MS}/actuator/health
kubernetes:
namespace: ${UMP_NAMESPACE}
when: manual
staging-gateway-install-job:
extends: .base-gateway-install-job
variables:
UMP_ENVIRONMENT: ${UMP_ENVIRONMENT_STAGING}
UMP_NAMESPACE: ${UMP_NAMESPACE_STAGING}
only:
- staging
staging-gateway-upgrade-job:
extends: .base-gateway-upgrade-job
variables:
UMP_ENVIRONMENT: ${UMP_ENVIRONMENT_STAGING}
UMP_NAMESPACE: ${UMP_NAMESPACE_STAGING}
only:
- staging
staging-ms-install-job:
extends: .base-ms-install-job
variables:
UMP_ENVIRONMENT: ${UMP_ENVIRONMENT_STAGING}
UMP_NAMESPACE: ${UMP_NAMESPACE_STAGING}
# UMP_MS: "documentation"
only:
- staging
staging-ms-upgrade-job:
extends: .base-ms-upgrade-job
variables:
UMP_ENVIRONMENT: ${UMP_ENVIRONMENT_STAGING}
UMP_NAMESPACE: ${UMP_NAMESPACE_STAGING}
# UMP_MS: "documentation"
only:
- staging
staging-echo-variable-job:
stage: management
script:
- echo $UMP_ECHO_VARIABLE
when: manual
only:
- staging
# Универсальная модульная платформа
## Universal modular platform (UMP)
# Universal modular platform (UMP) - Универсальная модульная платформа
[![pipeline status](https://gitlab.asvoip.com/pro-sd/pro-sd-ump/badges/master/pipeline.svg)](https://gitlab.asvoip.com/pro-sd/pro-sd-ump/-/commits/master)
[![coverage report](https://gitlab.asvoip.com/pro-sd/pro-sd-ump/badges/master/coverage.svg)](https://gitlab.asvoip.com/pro-sd/pro-sd-ump/-/commits/master)
Универсальная модульная расширяемая открытая платформа для быстрого создания качественных
масштабируемых микросервисов с использованием современных технологий,
......@@ -46,6 +48,7 @@
## Преимущества
### Преимущества для разработчика
* Закрепление и расширение теоретических ИТ знаний.
* Приобретение опыта работы с профессиональными современными средствами разработки, тестирования и развертывания.
......@@ -56,6 +59,7 @@
* Возможность использования платформы для дальнейшей самостоятельной или коммерческой разработки систем.
### Преимущества для заказчика
* Получение быстрого первого результата на старте проекта.
* Значительное уменьшение финансовых затрат.
* Сокращение ряда рисков.
......@@ -64,6 +68,7 @@
* Масштабируемый программный продукт.
### Преимущества для пользователей
* Современный программный продукт.
* Быстрое итерационное получение и апробация нового функционала.
* Возможность предлагать новые улучшения или функционал и влиять на развитие продукта.
......@@ -79,13 +84,15 @@
* GitLab
* Mattermost
* Java 11
* Maven
* Docker
* Spring 5 / Spring Boot 2
* Hibernate 5
* PostgreSQL 12
* Keycloak 11
* Kubernetes (K8S)
* Prometheus, Grafana, Alertmanager on Kubernetes
* Keycloak
* Helm
* Kubernetes (K8S)
* Prometheus, Grafana, Alertmanager on Kubernetes
* Elastic Cloud on Kubernetes (Elasticsearch, Beats & Logstash, Kibana)
* и другие
......@@ -101,6 +108,7 @@
## Модули проекта
### Библиотеки
* ump-dependencies - UMP Dependencies, зависимости UMP библиотек.
* ump-it-lib - UMP Integration Test library, библиотека для интеграционных тестов.
* ump-dto-lib - UMP Data Transfer Object library, библиотека с классами для передачи данных (REST API и др.) между микросервисами.
......@@ -112,10 +120,11 @@
* ump-smsio-lib - UMP SMS IO library, библиотека СМС провайдера.
### Микросервисы
* ump-gateway-ms - HTTP шлюз.
* ump-config-ms - UMP Config MicroService, микросервис конфигурации микросервисов.
* ump-bootadmin-ms - UMP Boot Admin MicroService, микросервис мониторинга микросервисов.
* ump-documentation-ms - UMP Documentation Microservice, микросервис документации.
* ump-registry-ms - UMP Registry MicroService, микросервис регистрации микросервисов.
* ump-component-ms - UMP Component MicroService, шаблон для разработки микросервиса.
* ump-tenantmanager-ms - UMP Tenant Manager MicroService, микросервис `Менеджер арендатора` для управления конфигурацией арендатора системы (tenant, application, channel).
* ump-filemanager-ms - UMP File Manager MicroService, микросервис `Менеджер файлов` для хранения и управления файлами.
......@@ -127,8 +136,10 @@
* ump-workflowmanager-ms - UMP Workflow Manager MicroService, микросервис `Менеджер рабочих процессов` для запуска кастомизированных рабочих процессов.
* ump-currencymanager-ms - UMP Currency Manager MicroService, микросервис `Менеджер валют` - информация и сервисы валют.
* ump-workschedule-ms - UMP Work Schedule MicroService, микросервис `Рабочее расписание` для управления и конфигурирования рабочего расписания.
* ump-quiz-ms - UMP Quiz MicroService, микросервис для cоздания и прохождения Квиза.
### Библиотеки API для микросервисов
* ump-tenantmanager-api - API для микросервиса ump-tenantmanager-ms.
* ump-filemanager-api - API для микросервиса ump-filemanager-ms.
* ump-templatemanager-api - API для микросервиса ump-templatemanager-ms.
......@@ -139,12 +150,15 @@
* ump-workflowmanager-api - API для микросервиса ump-workflowmanager-ms.
* ump-currencymanager-api - API для микросервиса ump-currencymanager-ms.
* ump-workschedule-api - API для микросервиса ump-workschedule-ms.
* ump-quiz-api - API для микросервиса ump-quiz-ms.
### Инфраструктурные сервисы
* ump-gateway - HTTP шлюз.
* ump-postgres - UMP Postgres, СУБД Postgres.
### Kubernetes (K8S) с инфраструктурными сервисами
Kubernetes (K8S) - расширяемая платформа для автоматизации развёртывания, масштабирования и управления контейнеризированными приложениями.
* Prometheus - база данных временных рядов, система мониторинга.
* Grafana - платформа для визуализации, мониторинга и анализа метрик и данных.
......
......@@ -13,7 +13,8 @@
"mail.smtp.socketFactory.port": {"type":"Integer","name":"mail.smtp.socketFactory.port", "value":"465", "description": "socket port"},
"mail.smtp.socketFactory.class": {"type":"String","name":"mail.smtp.socketFactory.class", "value":"javax.net.ssl.SSLSocketFactory", "description": "socket class"},
"mail.smtp.auth": {"type":"String","name":"mail.smtp.auth", "value":"true", "description": "auth"},
"mail.smtp.port": {"type":"Integer","name":"mail.smtp.port", "value":"465", "description": "port"}
"mail.smtp.port": {"type":"Integer","name":"mail.smtp.port", "value":"465", "description": "port"},
"mail.smtp.ssl.protocols": {"type":"String","name":"mail.smtp.ssl.protocols", "value":"TLSv1.2", "description": "mail.smtp.ssl.protocols"}
}
}
}
......@@ -4,4 +4,10 @@
CREATE USER ump PASSWORD 'eybdthcfkm247';
-- Создайте БД
CREATE DATABASE "ump-emailio" WITH OWNER = ump ENCODING = 'UTF8';
CREATE DATABASE ump WITH OWNER = ump ENCODING = 'UTF8';
-- переключиться на DB "ump" (в консоли можно следующей командой, в админке вручную)
\c ump
-- Создайте расширение в БД
CREATE EXTENSION IF NOT EXISTS pgcrypto;
# https://hub.docker.com/layers/adoptopenjdk/library/adoptopenjdk/11.0.7_10-jdk-hotspot-bionic/images/sha256-05df284aea654234eb1de8d8346a0079c33ab03adda1262f92971c39388e99e8?context=explore
FROM adoptopenjdk:11.0.7_10-jdk-hotspot-bionic
# https://hub.docker.com/r/bellsoft/liberica-openjdk-alpine
FROM bellsoft/liberica-openjdk-alpine:11
ARG PROJECT_BUILD_NAME
ENV PROJECT_BUILD_NAME=${PROJECT_BUILD_NAME}
ENV JAR_FILE=${PROJECT_BUILD_NAME}.jar
RUN addgroup --system --gid 1001 appuser
RUN adduser --system --uid 1001 --group appuser
RUN mkdir -p /var/ump/log
RUN chown -R appuser:appuser /var/ump
RUN adduser -S appuser
COPY ${JAR_FILE} ${JAR_FILE}
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="pmd">
<description>Sonar Profile: pmd</description>
<rule ref="category/java/codestyle.xml/MDBAndSessionBeanNamingConvention">
<priority>3</priority>
</rule>
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/RemoteSessionInterfaceNamingConvention">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/ByteInstantiation">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/UseStringBufferLength">
<priority>4</priority>
</rule>
<rule ref="category/java/errorprone.xml/BadComparison">
<priority>3</priority>
</rule>
<rule ref="category/java/documentation.xml/CommentSize">
<priority>4</priority>
<properties>
<property name="maxLineLength" value="160"/>
<property name="maxLines" value="8"/>
</properties>
</rule>
<rule ref="category/java/errorprone.xml/CallSuperFirst">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/StaticEJBFieldShouldBeFinal">
<priority>3</priority>
</rule>
<rule ref="category/java/design.xml/NPathComplexity">
<priority>3</priority>
<properties>
<property name="minimum" value="200"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/RemoteInterfaceNamingConvention">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/IntegerInstantiation">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/AvoidInstantiatingObjectsInLoops">
<priority>4</priority>
</rule>
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/LocalInterfaceSessionNamingConvention">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/UnnecessaryModifier">
<priority>5</priority>
</rule>
<rule ref="category/java/bestpractices.xml/GuardLogStatement">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/StringInstantiation">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/UseStringBufferForStringAppends">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/ShortInstantiation">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/SuspiciousOctalEscape">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/CallSuperInConstructor">
<priority>4</priority>
</rule>
<rule ref="category/java/codestyle.xml/LocalHomeNamingConvention">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/UselessQualifiedThis">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/CallSuperLast">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/DataflowAnomalyAnalysis">
<priority>3</priority>
<properties>
<property name="maxViolations" value="100"/>
<property name="maxPaths" value="1000"/>
</properties>
</rule>
<rule ref="category/java/performance.xml/OptimizableToArrayCall">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals">
<priority>3</priority>
</rule>
<rule ref="category/java/multithreading.xml/UseConcurrentHashMap">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/EmptyMethodInAbstractClassShouldBeAbstract">
<priority>3</priority>
</rule>
<rule ref="category/java/design.xml/ImmutableField">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/SimplifyStartsWith">
<priority>4</priority>
</rule>
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck">
<priority>3</priority>
</rule>
<rule ref="category/java/multithreading.xml/AvoidThreadGroup">
<priority>2</priority>
</rule>
<rule ref="category/java/performance.xml/AppendCharacterWithChar">
<priority>4</priority>
</rule>
<rule ref="category/java/performance.xml/LongInstantiation">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/AvoidFinalLocalVariable">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable">
<priority>2</priority>
</rule>
<rule ref="category/java/design.xml/SimplifyConditional">
<priority>3</priority>
</rule>
<rule ref="category/java/bestpractices.xml/GuardLogStatement">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/BooleanInstantiation">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/AvoidArrayLoops">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/ConsecutiveLiteralAppends">
<priority>4</priority>
<properties>
<property name="threshold" value="1"/>
</properties>
</rule>
<rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/SingleMethodSingleton">
<priority>2</priority>
</rule>
<rule ref="category/java/bestpractices.xml/GuardLogStatement">
<priority>3</priority>
</rule>
<rule ref="category/java/documentation.xml/CommentContent">
<priority>4</priority>
</rule>
<rule ref="category/java/errorprone.xml/NullAssignment">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/AvoidUsingShortType">
<priority>3</priority>
</rule>
<rule ref="category/java/multithreading.xml/DoNotUseThreads">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/SimpleDateFormatNeedsLocale">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/LocalVariableCouldBeFinal">
<priority>4</priority>
</rule>
<rule ref="category/java/design.xml/SingularField">
<priority>4</priority>
</rule>
<rule ref="category/java/performance.xml/UseIndexOfChar">
<priority>3</priority>
</rule>
<rule ref="category/java/codestyle.xml/DefaultPackage">
<priority>4</priority>
</rule>
<rule ref="category/java/multithreading.xml/AvoidUsingVolatile">
<priority>3</priority>
</rule>
<rule ref="category/java/design.xml/SimplifiedTernary">
<priority>3</priority>
</rule>
<rule ref="category/java/bestpractices.xml/UseVarargs">
<priority>3</priority>
</rule>
<rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard">
<priority>3</priority>
</rule>
<rule ref="category/java/performance.xml/InefficientStringBuffering">
<priority>3</priority>