[OPB-3] adding initial structure of oneplus bot with deployment and selected modules

adding volume configuration to grafana and postgres
adding .env file for variables in docker compose
adding handling of password for prometheus
adding port configuration for more services
adding custom starboard notifications
updating readme and adding release job
 adding settings.xml for build
This commit is contained in:
Sheldan
2021-03-17 01:15:21 +01:00
parent 44a56d67c7
commit 71896bf3b6
77 changed files with 6086 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>starboard-custom</module>
</modules>
</project>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>starboard-custom-templates</artifactId>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>starboard-custom-templates-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,15 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>.</outputDirectory>
<directory>${project.basedir}/src/main/resources</directory>
</fileSet>
</fileSets>
</assembly>

View File

@@ -0,0 +1,41 @@
{
"title": {
"title": "<@safe_include "starboard_post_created_title"/>"
},
<#include "abstracto_color">,
"description": "<@safe_include "starboard_post_created_description"/>",
"fields": [
{
"name": "<@safe_include "starboard_post_notification_field_starboard_message"/>",
<#if starboardMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starboardMessage.jumpUrl})"
<#else>
"value": "${post.starboardMessageId?c}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_message"/>",
<#if starredMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starredMessage.jumpUrl})"
<#else>
"value": "${post.postMessageId?c}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_user"/>",
<#if starredMember??>
"value": "${starredMember.asMention}"
<#else>
"value": "${starredUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starring_user"/>",
<#if starringMember??>
"value": "${starringMember.asMention}"
<#else>
"value": "${starringUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
}
]
}

View File

@@ -0,0 +1,33 @@
{
"title": {
"title": "<@safe_include "starboard_post_deleted_title"/>"
},
<#include "abstracto_color">,
"description": "<@safe_include "starboard_post_deleted_description"/>",
"fields": [
{
"name": "<@safe_include "starboard_post_notification_field_starred_message"/>",
<#if starredMessage??>
"value": "[<@safe_include "starboard_post_notification_field_starboard_message_jump"/>](${starredMessage.jumpUrl})"
<#else>
"value": "${starredMessageSimple.jumpUrl}"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starred_user"/>",
<#if starredMember??>
"value": "${starredMember.asMention}"
<#else>
"value": "${starredUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
},
{
"name": "<@safe_include "starboard_post_notification_field_starring_user"/>",
<#if starringMember??>
"value": "${starringMember.asMention}"
<#else>
"value": "${starringUserId?c} (<@safe_include "user_left_server"/>)"
</#if>
}
]
}

22
templates/pom.xml Normal file
View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modules>
<module>oneplus-bot-modules</module>
<module>translations</module>
</modules>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
</project>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
<artifactId>translations</artifactId>
<packaging>pom</packaging>
<modules>
<module>starboard-custom-translations</module>
</modules>
</project>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations</groupId>
<artifactId>translations</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>starboard-custom</artifactId>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>starboard-custom-translations-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,15 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>.</outputDirectory>
<directory>${project.basedir}/src/main/resources</directory>
</fileSet>
</fileSets>
</assembly>

View File

@@ -0,0 +1 @@
The channel where the notifications about starboard posts should be posted to. Currently: ${currentTarget}

View File

@@ -0,0 +1 @@
Starboard post ${post.id?c} was created, because it reached the threshold.

View File

@@ -0,0 +1 @@
Starboard post was deleted, because it fell under the threshold.