mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-01-01 07:27:30 +00:00
[OPB-xxx] updating abstracto version
enabling giveaway and image generation feature
This commit is contained in:
4
.env
Normal file
4
.env
Normal file
@@ -0,0 +1,4 @@
|
||||
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
|
||||
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
|
||||
VERSION=1.6.12
|
||||
ABSTRACTO_VERSION=1.5.18
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -33,9 +33,8 @@ jobs:
|
||||
id: dotenv
|
||||
uses: falti/dotenv-action@v1.0.4
|
||||
with:
|
||||
path: ./deployment/image-packaging/src/main/docker/.env
|
||||
path: .env
|
||||
- name: Push container
|
||||
working-directory: ./deployment/image-packaging/src/main/docker
|
||||
run: docker-compose build && docker-compose push
|
||||
env:
|
||||
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
|
||||
|
||||
2
Tiltfile
2
Tiltfile
@@ -2,6 +2,7 @@ allow_k8s_contexts('k8s-cluster')
|
||||
|
||||
load('ext://restart_process', 'docker_build_with_restart')
|
||||
registry = 'harbor.sheldan.dev/oneplus-bot/'
|
||||
abstracto_registry = 'harbor.sheldan.dev/abstracto/'
|
||||
|
||||
local_resource(
|
||||
'oneplus-bot-java-compile',
|
||||
@@ -29,6 +30,7 @@ docker_build_with_restart(
|
||||
|
||||
docker_build(registry + 'oneplus-bot-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
|
||||
docker_build(registry + 'oneplus-bot-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
|
||||
docker_build(registry + 'oneplus-bot-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
|
||||
|
||||
|
||||
k8s_yaml(helm('deployment/helm/oneplus-bot', values=
|
||||
|
||||
@@ -151,6 +151,16 @@
|
||||
<artifactId>experience-tracking-impl</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>giveaway-impl</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>image-generation-impl</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>moderation-impl</artifactId>
|
||||
|
||||
@@ -71,6 +71,10 @@ spec:
|
||||
secretKeyRef:
|
||||
name: api-keys
|
||||
key: youtubeApiKey
|
||||
- name: PRIVATE_REST_API_HOST
|
||||
value: "{{ .Values.privateRestApi.service.name }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
- name: PRIVATE_REST_API_PORT
|
||||
value: "{{ .Values.privateRestApi.service.targetPort }}"
|
||||
{{- range $key, $value := .Values.bot.propertyConfig }}
|
||||
- name: {{ $key | quote }}
|
||||
value: {{ $value | quote}}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
{{- if .Values.privateRestApi.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "oneplusBot.fullname" . }}-private-rest-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: private-rest-api
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.privateRestApi.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: private-rest-api
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "oneplusBot.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.privateRestApi.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-private-rest-api
|
||||
securityContext:
|
||||
{{- toYaml .Values.privateRestApi.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.privateRestApi.repository }}/{{ .Values.privateRestApi.image }}:{{ .Values.privateRestApi.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.privateRestApi.pullPolicy }}
|
||||
ports:
|
||||
- name: {{ .Values.privateRestApi.service.name }}
|
||||
containerPort: {{ .Values.privateRestApi.service.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.privateRestApi.service.port }}
|
||||
initialDelaySeconds: {{ $.Values.privateRestApi.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ $.Values.privateRestApi.livenessProbe.periodSeconds }}
|
||||
failureThreshold: {{ $.Values.privateRestApi.livenessProbe.failureThreshold }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: {{ .Values.privateRestApi.service.port }}
|
||||
initialDelaySeconds: {{ $.Values.privateRestApi.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ $.Values.privateRestApi.readinessProbe.periodSeconds }}
|
||||
failureThreshold: {{ $.Values.privateRestApi.readinessProbe.failureThreshold }}
|
||||
resources:
|
||||
{{- toYaml .Values.privateRestApi.resources | nindent 12 }}
|
||||
{{- with .Values.privateRestApi.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.privateRestApi.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.privateRestApi.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if .Values.privateRestApi.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.privateRestApi.service.name }}
|
||||
spec:
|
||||
selector:
|
||||
app: private-rest-api
|
||||
ports:
|
||||
- port: {{ .Values.privateRestApi.service.targetPort }}
|
||||
targetPort: {{ .Values.privateRestApi.service.port }}
|
||||
{{- end }}
|
||||
@@ -27,7 +27,7 @@ templateDeployment:
|
||||
repository: harbor.sheldan.dev/abstracto
|
||||
pullPolicy: Always
|
||||
image: abstracto-template-deployment
|
||||
tag: 1.5.12
|
||||
tag: 1.5.18
|
||||
|
||||
templateDeploymentData:
|
||||
repository: harbor.sheldan.dev/oneplus-bot
|
||||
@@ -40,7 +40,7 @@ dbConfigDeployment:
|
||||
repository: harbor.sheldan.dev/abstracto
|
||||
pullPolicy: Always
|
||||
image: abstracto-db-deployment
|
||||
tag: 1.5.12
|
||||
tag: 1.5.18
|
||||
|
||||
dbConfigDeploymentData:
|
||||
repository: harbor.sheldan.dev/oneplus-bot
|
||||
@@ -55,6 +55,38 @@ dbCredentials:
|
||||
password:
|
||||
name:
|
||||
|
||||
privateRestApi:
|
||||
enabled: true
|
||||
repository: harbor.sheldan.dev/oneplus-bot
|
||||
pullPolicy: Always
|
||||
image: oneplus-bot-private-rest-api
|
||||
tag: 1.6.12
|
||||
podAnnotations: {}
|
||||
podSecurityContext: {}
|
||||
securityContext: {}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
service:
|
||||
port: 8080
|
||||
targetPort: 80
|
||||
name: private-restapi # must be less than 16 chars
|
||||
resources:
|
||||
limits:
|
||||
cpu:
|
||||
memory:
|
||||
requests:
|
||||
cpu:
|
||||
memory:
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
grafanaDeployment:
|
||||
repository: harbor.sheldan.dev/grafana-tools
|
||||
pullPolicy: Always
|
||||
|
||||
@@ -200,6 +200,26 @@
|
||||
<destFileName>statistic.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||
<artifactId>giveaway</artifactId>
|
||||
<version>${abstracto.templates.version}</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${file.basedir}/template-data/template-artifacts/</outputDirectory>
|
||||
<destFileName>giveaway.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||
<artifactId>image-generation</artifactId>
|
||||
<version>${abstracto.templates.version}</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${file.basedir}/template-data/template-artifacts/</outputDirectory>
|
||||
<destFileName>image-generation.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto-templates.templates</groupId>
|
||||
<artifactId>logging</artifactId>
|
||||
@@ -442,6 +462,26 @@
|
||||
<destFileName>logging.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
||||
<artifactId>giveaway</artifactId>
|
||||
<version>${abstracto.templates.version}</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${file.basedir}/template-data/translation-artifacts/</outputDirectory>
|
||||
<destFileName>giveaway.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto-templates.translations</groupId>
|
||||
<artifactId>image-generation</artifactId>
|
||||
<version>${abstracto.templates.version}</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${file.basedir}/template-data/translation-artifacts/</outputDirectory>
|
||||
<destFileName>image-generation.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
|
||||
<artifactId>starboard-customization-translations</artifactId>
|
||||
@@ -745,6 +785,28 @@
|
||||
<destFileName>logging.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>giveaway-impl</artifactId>
|
||||
<version>${abstracto.version}</version>
|
||||
<classifier>liquibase</classifier>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${file.basedir}/db-data/liquibase-artifacts/</outputDirectory>
|
||||
<destFileName>giveaway.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>image-generation-impl</artifactId>
|
||||
<version>${abstracto.version}</version>
|
||||
<classifier>liquibase</classifier>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${file.basedir}/db-data/liquibase-artifacts/</outputDirectory>
|
||||
<destFileName>image-generation.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<!-- customizations -->
|
||||
<artifactItem>
|
||||
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
|
||||
VERSION=1.6.12
|
||||
@@ -9,6 +9,8 @@
|
||||
{ "zip": "starboard", "file": "starboard-changeLog.xml"},
|
||||
{ "zip": "remind", "file": "remind-changeLog.xml"},
|
||||
{ "zip": "logging", "file": "logging-changeLog.xml"},
|
||||
{ "zip": "giveaway", "file": "giveaway-changeLog.xml"},
|
||||
{ "zip": "image-generation", "file": "imageGeneration-changeLog.xml"},
|
||||
{ "zip": "suggestion", "file": "suggestion-changeLog.xml"},
|
||||
{ "zip": "invite-filter", "file": "inviteFilter-changeLog.xml"},
|
||||
{ "zip": "profanity-filter", "file": "profanityFilter-changeLog.xml"},
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
bot:
|
||||
build:
|
||||
context: oneplusbot
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-image:${VERSION:-latest}
|
||||
db-data:
|
||||
build:
|
||||
context: db-data
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-db-data:${VERSION:-latest}
|
||||
template-data:
|
||||
build:
|
||||
context: template-data
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-template-data:${VERSION:-latest}
|
||||
@@ -0,0 +1,6 @@
|
||||
ARG REGISTRY_PREFIX
|
||||
ARG ABSTRACTO_VERSION
|
||||
FROM ${REGISTRY_PREFIX}abstracto-rest-api-image-gen:${ABSTRACTO_VERSION:-latest} AS image-gen-api
|
||||
|
||||
FROM ${REGISTRY_PREFIX}abstracto-rest-api:${ABSTRACTO_VERSION:-latest} AS running-image
|
||||
COPY --from=image-gen-api /python /python
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"template_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "webservices", "remind", "logging",
|
||||
"suggestion", "invite-filter", "profanity-filter", "statistic", "experience-tracking", "moderation", "modmail", "assignable-roles",
|
||||
"voice-channel-context", "anti-raid",
|
||||
"voice-channel-context", "anti-raid", "giveaway", "image-generation",
|
||||
"starboard-custom",
|
||||
"overrides-templates-webservices", "overrides-templates-core", "overrides-templates-logging", "overrides-templates-statistic",
|
||||
"overrides-templates-modmail", "overrides-templates-moderation",
|
||||
"news", "referral", "faq"],
|
||||
"translation_artifacts": ["utility", "core", "entertainment", "starboard", "link-embed", "webservices", "suggestion",
|
||||
"remind", "logging", "invite-filter", "profanity-filter", "statistic", "experience-tracking", "moderation", "modmail", "assignable-roles",
|
||||
"voice-channel-context", "anti-raid",
|
||||
"voice-channel-context", "anti-raid", "giveaway", "image-generation",
|
||||
"starboard-custom", "dynamic-activity-custom-translations", "moderation-custom",
|
||||
"overrides-translation-moderation",
|
||||
"news", "setup", "referral", "faq", "seasonal"]
|
||||
|
||||
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
bot:
|
||||
build:
|
||||
context: deployment/image-packaging/src/main/docker/oneplusbot
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-image:${VERSION:-latest}
|
||||
db-data:
|
||||
build:
|
||||
context: deployment/image-packaging/src/main/docker/db-data
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-db-data:${VERSION:-latest}
|
||||
private-rest-api-packaging:
|
||||
build:
|
||||
context: deployment/image-packaging/src/main/docker/private-rest-api
|
||||
args:
|
||||
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
|
||||
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-private-rest-api:${VERSION:-latest}
|
||||
template-data:
|
||||
build:
|
||||
context: deployment/image-packaging/src/main/docker/template-data
|
||||
image: ${REGISTRY_PREFIX}oneplus-bot-template-data:${VERSION:-latest}
|
||||
6
pom.xml
6
pom.xml
@@ -17,10 +17,8 @@
|
||||
<properties>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<!-- edit in release.yml as well -->
|
||||
<!-- when releasing a new opbot version, update the .env as well-->
|
||||
<abstracto.version>1.5.12</abstracto.version>
|
||||
<abstracto.templates.version>1.4.23</abstracto.templates.version>
|
||||
<abstracto.version>1.5.18</abstracto.version>
|
||||
<abstracto.templates.version>1.4.27</abstracto.templates.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
||||
Reference in New Issue
Block a user