Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .github/workflows/build-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# This is a basic workflow to help you get started with Actions

name: Push Maven realease

on:
release:
types: [created]

jobs:
publish-maven-central:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3

- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Publish to the Maven Central Repository
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

build-production-maven:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout Code
uses: actions/checkout@v3

- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn --batch-mode clean package

- name: Publish Package Artifacts
uses: actions/upload-artifact@v3
with:
name: maven-packages
path: modules/**/target/*.jar

build-production-docker-images:
needs: build-production-maven
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout source code
uses: actions/checkout@v3

- name: Download Package Artifacts
uses: actions/download-artifact@v3
with:
name: maven-packages
path: modules

- name: Build funixgaming api docker images and push
run: docker compose build --push

update-kubernetes-cluster:
needs:
- build-production-docker-images

runs-on: ubuntu-latest

steps:
- name: Set up kubectl
uses: azure/k8s-set-context@v3
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}

- name: Checkout source code
uses: actions/checkout@v3

- name: Update Kubernetes Cluster
run: cd kubernetes && chmod +x ./deployServices.sh && ./deployServices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
Expand All @@ -33,4 +26,4 @@ jobs:
cache: maven

- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
run: mvn --batch-mode --update-snapshots clean verify -Dmaven.javadoc.skip -Dgpg.skip
71 changes: 0 additions & 71 deletions .github/workflows/push-maven-central.yml

This file was deleted.

14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM openjdk:17-alpine

ARG service_name
ARG service_base_dir
ENV SERVICE_NAME=${service_name}
ENV SERVICE_BASE_DIR=${service_base_dir}
ENV APP_VERSION=1.3.0.0

WORKDIR /container/java

ADD ./modules/${SERVICE_BASE_DIR}/service/target/funixgaming-${SERVICE_NAME}-service-${APP_VERSION}.jar /container/java/service.jar

WORKDIR /container/app
ENTRYPOINT ["/bin/sh", "-c", "java -jar -Xms150M -XX:MaxRAMPercentage=95.0 /container/java/service.jar"]

This file was deleted.

15 changes: 0 additions & 15 deletions api/src/test/java/fr/funixgaming/api/client/TestApp.java

This file was deleted.

36 changes: 0 additions & 36 deletions api/src/test/java/fr/funixgaming/api/client/beans/JsonHelper.java

This file was deleted.

34 changes: 0 additions & 34 deletions api/src/test/resources/application.properties

This file was deleted.

11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'

services:
#FunixBot service
build-production-server-box-service:
image: ghcr.io/funixproductions/funixgaming-api-funixbot:latest
build:
context: .
args:
service_name: funixbot
service_base_dir: funixbot
16 changes: 0 additions & 16 deletions entrypointPteroq.sh

This file was deleted.

13 changes: 13 additions & 0 deletions kubernetes/config/certificates-ssl/certificate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: funixgaming-api-certificate
namespace: "funixproductions"
spec:
secretName: funixgaming-api-certificate-tls
issuerRef:
name: letsencrypt
kind: ClusterIssuer
commonName: "api.funixgaming.fr"
dnsNames:
- "api.funixgaming.fr"
21 changes: 21 additions & 0 deletions kubernetes/config/ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: 'funixproductions'
name: funixgaming-api-ingress
annotations:
spec.ingressClassName: traefik
spec:
tls:
- secretName: funixgaming-api-certificate-tls
rules:
- host: api.funixgaming.fr
http:
paths:
- path: /funixbot
pathType: Prefix
backend:
service:
name: funixbot-service
port:
number: 80
Loading