Commit from GitHub Actions (Publishes a new version of the application)

This commit is contained in:
release-bot
2024-01-22 01:07:43 +00:00
parent 44fc655466
commit 5d58424b83
34 changed files with 320 additions and 8 deletions

2
.env
View File

@@ -1,2 +1,2 @@
REGISTRY_PREFIX=harbor.sheldan.dev/gw2/
VERSION=0.0.1
VERSION=0.0.2

View File

@@ -1,8 +1,5 @@
apiVersion: v2
name: gw2-tools
description: A Helm chart for Kubernetes
type: application
version: 0.0.1
version: 0.0.2

View File

@@ -0,0 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,34 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<changeSet author="Sheldan" id="currency-table">
<createTable tableName="currency">
<column name="id" type="INTEGER">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(255)">
<constraints nullable="true"/>
</column>
<column name="icon_url" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<sql>
DROP TRIGGER IF EXISTS currency_update_trigger ON currency;
CREATE TRIGGER currency_update_trigger BEFORE UPDATE ON currency FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS currency_insert_trigger ON currency;
CREATE TRIGGER currency_insert_trigger BEFORE INSERT ON currency FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,44 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<changeSet author="Sheldan" id="item-table">
<createTable tableName="item">
<column name="id" type="INTEGER">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(128)">
<constraints nullable="false"/>
</column>
<column name="description" type="VARCHAR(1024)">
<constraints nullable="true"/>
</column>
<column name="icon_url" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="type" type="VARCHAR(64)">
<constraints nullable="true"/>
</column>
<column name="rarity" type="VARCHAR(32)">
<constraints nullable="true"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<sql>
ALTER TABLE item ADD CONSTRAINT check_item_rarity CHECK (rarity IN ('JUNK', 'BASIC', 'FINE', 'MASTERWORK', 'RARE', 'EXOTIC', 'ASCENDED', 'LEGENDARY'));
ALTER TABLE item ADD CONSTRAINT check_item_type CHECK (type IN ('CONTAINER', 'ARMOR', 'BACK', 'BAG', 'CONSUMABLE', 'CRAFTING_MATERIAL', 'GATHERING', 'GIZMO', 'JADE_TECH_MODULE', 'KEY', 'MINI_PET', 'POWER_CORE', 'TOOL', 'TRAIT', 'TRINKET', 'TROPHY', 'UPGRADE_COMPONENT', 'WEAPON', 'RELIC'));
</sql>
<sql>
DROP TRIGGER IF EXISTS item_update_trigger ON item;
CREATE TRIGGER item_update_trigger BEFORE UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS item_insert_trigger ON item;
CREATE TRIGGER item_insert_trigger BEFORE INSERT ON item FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,82 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<changeSet author="Sheldan" id="opening-table">
<createTable tableName="opening">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="pk_opening"/>
</column>
<column name="user_id" type="VARCHAR(255)">
<constraints nullable="false" />
</column>
<column name="description" type="VARCHAR(1024)"/>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addForeignKeyConstraint baseColumnNames="user_id" baseTableName="opening" constraintName="fk_opening_user" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="gw2_user" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS opening_update_trigger ON opening;
CREATE TRIGGER opening_update_trigger BEFORE UPDATE ON opening FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS opening_insert_trigger ON opening;
CREATE TRIGGER opening_insert_trigger BEFORE INSERT ON opening FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
<changeSet author="Sheldan" id="opening_currency-table">
<createTable tableName="opening_currency">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="pk_opening_currency"/>
</column>
<column name="opening_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="currency_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="amount" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
<addForeignKeyConstraint baseColumnNames="opening_id" baseTableName="opening_currency"
constraintName="fk_opening_currency_opening" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="opening"
validate="true"/>
<addForeignKeyConstraint baseColumnNames="currency_id" baseTableName="opening_currency"
constraintName="fk_opening_currency_currency" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="currency" validate="true"/>
</changeSet>
<changeSet author="Sheldan" id="opening_item-table">
<createTable tableName="opening_item">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="pk_opening_item"/>
</column>
<column name="opening_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="item_id" type="INT">
<constraints nullable="false"/>
</column>
<column name="count" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
<addForeignKeyConstraint baseColumnNames="opening_id" baseTableName="opening_item"
constraintName="fk_opening_item_opening" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="opening"
validate="true"/>
<addForeignKeyConstraint baseColumnNames="item_id" baseTableName="opening_item"
constraintName="fk_opening_item_item" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="item" validate="true"/>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,8 @@
CREATE OR REPLACE FUNCTION insert_trigger_procedure() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW.created := CURRENT_TIMESTAMP;
RETURN NEW;
END;
$$;

View File

@@ -0,0 +1,8 @@
CREATE OR REPLACE FUNCTION update_trigger_procedure() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW.updated := CURRENT_TIMESTAMP;
RETURN NEW;
END;
$$;

View File

@@ -0,0 +1,34 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<changeSet author="Sheldan" id="submission_template-table">
<createTable tableName="submission_template">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="pk_submission_template"/>
</column>
<column name="item_id" type="INTEGER">
<constraints nullable="false" />
</column>
<column name="description" type="VARCHAR(1024)"/>
<column name="template_text" type="VARCHAR(2048)"/>
<column name="name" type="VARCHAR(128)"/>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addForeignKeyConstraint baseColumnNames="item_id" baseTableName="submission_template" constraintName="fk_submission_template_item" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="item" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS submission_template_update_trigger ON submission_template;
CREATE TRIGGER submission_template_update_trigger BEFORE UPDATE ON submission_template FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS submission_template_insert_trigger ON submission_template;
CREATE TRIGGER submission_template_insert_trigger BEFORE INSERT ON submission_template FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,11 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<include file="trigger_functions.xml" relativeToChangelogFile="true"/>
<include file="item.xml" relativeToChangelogFile="true"/>
<include file="currency.xml" relativeToChangelogFile="true"/>
<include file="user.xml" relativeToChangelogFile="true"/>
<include file="opening.xml" relativeToChangelogFile="true"/>
<include file="submission_template.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,15 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<changeSet author="Sheldan" id="insert_trigger" dbms="postgresql">
<sqlFile encoding="utf8" path="sql/insert_trigger.sql"
relativeToChangelogFile="true"
splitStatements="false"/>
</changeSet>
<changeSet author="Sheldan" id="update_trigger" dbms="postgresql">
<sqlFile encoding="utf8" path="sql/update_trigger.sql"
relativeToChangelogFile="true"
splitStatements="false"/>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,25 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<changeSet author="Sheldan" id="user-table">
<createTable tableName="gw2_user">
<column name="id" type="VARCHAR(255)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<sql>
DROP TRIGGER IF EXISTS gw2_user_update_trigger ON gw2_user;
CREATE TRIGGER gw2_user_update_trigger BEFORE UPDATE ON gw2_user FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS gw2_user_insert_trigger ON gw2_user;
CREATE TRIGGER gw2_user_insert_trigger BEFORE INSERT ON gw2_user FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,6 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.25.xsd">
<include file="0.0.1/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,3 @@
artifactId=database
groupId=dev.sheldan.gw2.tools
version=0.0.2

View File

@@ -0,0 +1,18 @@
management.endpoints.web.exposure.include=mappings
security.basic.enabled=false
management.security.enabled=false
spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
spring.datasource.username= ${DB_USER}
spring.datasource.password= ${DB_PASS}
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
spring.jpa.hibernate.default_schema=gw2
spring.jpa.properties.hibernate.default_schema=gw2
spring.quartz.jdbc.initialize-schema=never
management.metrics.tags.application=GW2-Tools
management.endpoint.health.probes.enabled=true
management.health.livenessState.enabled=true
management.health.readinessState.enabled=true
spring.application.name=GW2-Tools

View File

@@ -0,0 +1,11 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] [%-5level] [%logger{36}]: %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@@ -0,0 +1,3 @@
artifactId=executable
groupId=dev.sheldan.gw2.tools
version=0.0.2

View File

@@ -0,0 +1,3 @@
artifactId=gw2-api-client
groupId=dev.sheldan.gw2.tools
version=0.0.2

View File

@@ -0,0 +1,3 @@
artifactId=rest-api
groupId=dev.sheldan.gw2.tools
version=0.0.2

Submodule gw2-tools-backend/target/checkout added at 9ce315fa1e

View File

@@ -1,11 +1,11 @@
{
"name": "drr-ui",
"version": "0.0.1",
"version": "0.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.0.1",
"version": "0.0.2",
"dependencies": {
"@reduxjs/toolkit": "^2.0.1",
"@testing-library/jest-dom": "^5.17.0",

View File

@@ -1,6 +1,6 @@
{
"name": "gw2-tools-ui",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^2.0.1",