Skip to content
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
18 changes: 17 additions & 1 deletion .github/workflows/backend-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
env:
DB_USER: test
Expand Down Expand Up @@ -48,12 +48,19 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract backend version
id: version
run: |
VERSION=$(backend/mvnw help:evaluate -Dexpression=project.version -q -DforceStdout -f backend/pom.xml)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.VERSION }}
type=raw,value=latest
type=sha

Expand All @@ -65,3 +72,12 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Update Kubernetes manifest
run: |
sed -i "s|image: ghcr.io/devflima/flima.dev-backend:.*|image: ghcr.io/devflima/flima.dev-backend:${{ env.VERSION }}|g" k8s/backend/deployment.yaml
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add k8s/backend/deployment.yaml
git commit -m "chore: update backend image tag to ${{ env.VERSION }} [skip ci]" || echo "No changes to commit"
git push
19 changes: 18 additions & 1 deletion .github/workflows/frontend-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
steps:
- name: Checkout Code
Expand All @@ -28,12 +28,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract frontend version
id: version
working-directory: ./frontend
run: |
VERSION=$(node -p "require('./package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.VERSION }}
type=raw,value=latest
type=sha

Expand All @@ -45,4 +53,13 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Update Kubernetes manifest
run: |
sed -i "s|image: ghcr.io/devflima/flima.dev:.*|image: ghcr.io/devflima/flima.dev:${{ env.VERSION }}|g" k8s/frontend/deployment.yaml
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add k8s/frontend/deployment.yaml
git commit -m "chore: update frontend image tag to ${{ env.VERSION }} [skip ci]" || echo "No changes to commit"
git push


5 changes: 5 additions & 0 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
<quarkus.platform.version>3.34.5</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.5.4</surefire-plugin.version>

<!-- SonarCloud Exclusions -->
<sonar.issue.ignore.multicriteria>e1</sonar.issue.ignore.multicriteria>
<sonar.issue.ignore.multicriteria.e1.ruleKey>*</sonar.issue.ignore.multicriteria.e1.ruleKey>
<sonar.issue.ignore.multicriteria.e1.resourceKey>src/main/resources/db/migration/V1__Create_Initial_Schema.sql</sonar.issue.ignore.multicriteria.e1.resourceKey>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ CREATE TYPE role_enum AS ENUM ('OWNER');
CREATE TABLE contents (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
section_type section_type_enum NOT NULL,
title VARCHAR(255) NOT NULL CHECK (length(trim(title)) > 0),
subtitle VARCHAR(255) NOT NULL CHECK (length(trim(subtitle)) > 0)
title VARCHAR(255) NOT NULL CHECK (trim(title) <> ''),
subtitle VARCHAR(255) NOT NULL CHECK (trim(title) <> '')
);

CREATE TABLE educations (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
education_type education_type_enum NOT NULL,
degree VARCHAR(255) NOT NULL CHECK (length(trim(degree)) > 0),
title VARCHAR(255) NOT NULL CHECK (length(trim(title)) > 0),
institution VARCHAR(255) NOT NULL CHECK (length(trim(institution)) > 0),
period VARCHAR(100) NOT NULL CHECK (length(trim(period)) > 0),
specialization VARCHAR(255) NOT NULL CHECK (length(trim(specialization)) > 0)
degree VARCHAR(255) NOT NULL CHECK (trim(degree) <> ''),
title VARCHAR(255) NOT NULL CHECK (trim(title) <> ''),
institution VARCHAR(255) NOT NULL CHECK (trim(institution) <> ''),
period VARCHAR(100) NOT NULL CHECK (trim(period) <> ''),
specialization VARCHAR(255) NOT NULL CHECK (trim(specialization) <> '')
);

CREATE TABLE education_skills (
education_id UUID NOT NULL,
skill VARCHAR(150) NOT NULL CHECK (length(trim(skill)) > 0),
skill VARCHAR(150) NOT NULL CHECK (trim(skill) <> ''),

PRIMARY KEY (education_id, skill),

Expand All @@ -38,7 +38,7 @@ CREATE TABLE education_skills (

CREATE TABLE education_architectures (
education_id UUID NOT NULL,
architecture VARCHAR(150) NOT NULL CHECK (length(trim(architecture)) > 0),
architecture VARCHAR(150) NOT NULL CHECK (trim(architecture) <> ''),

PRIMARY KEY (education_id, architecture),

Expand All @@ -50,15 +50,15 @@ CREATE TABLE education_architectures (

CREATE TABLE experiences (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR(255) NOT NULL CHECK (length(trim(title)) > 0),
company VARCHAR(255) NOT NULL CHECK (length(trim(company)) > 0),
period VARCHAR(100) NOT NULL CHECK (length(trim(period)) > 0),
icon VARCHAR(50) NOT NULL CHECK (length(trim(icon)) > 0)
title VARCHAR(255) NOT NULL CHECK (trim(title) <> ''),
company VARCHAR(255) NOT NULL CHECK (trim(company) <> ''),
period VARCHAR(100) NOT NULL CHECK (trim(period) <> ''),
icon VARCHAR(50) NOT NULL CHECK (trim(icon) <> '')
);

CREATE TABLE experience_bullets (
experience_id UUID NOT NULL,
bullet VARCHAR(150) NOT NULL CHECK (length(trim(bullet)) > 0),
bullet VARCHAR(150) NOT NULL CHECK (trim(bullet) <> ''),

PRIMARY KEY (experience_id, bullet),

Expand All @@ -70,7 +70,7 @@ CREATE TABLE experience_bullets (

CREATE TABLE experience_technologies (
experience_id UUID NOT NULL,
technology VARCHAR(150) NOT NULL CHECK (length(trim(technology)) > 0),
technology VARCHAR(150) NOT NULL CHECK (trim(technology) <> ''),

PRIMARY KEY (experience_id, technology),

Expand All @@ -82,26 +82,26 @@ CREATE TABLE experience_technologies (

CREATE TABLE messages (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
username VARCHAR(150) NOT NULL CHECK (length(trim(username)) > 0),
email VARCHAR(255) NOT NULL CHECK (length(trim(email)) > 0) CHECK (position('@' in email) > 1),
subject VARCHAR(255) NOT NULL CHECK (length(trim(subject)) > 0),
message TEXT NOT NULL CHECK (length(trim(message)) > 0),
username VARCHAR(150) NOT NULL CHECK (trim(username) <> ''),
email VARCHAR(255) NOT NULL CHECK (trim(email) <> '') CHECK (position('@' in email) > 1),
subject VARCHAR(255) NOT NULL CHECK (trim(subject) <> ''),
message TEXT NOT NULL CHECK (trim(message) <> ''),
timestamp TIMESTAMP NOT NULL,
status_message status_message_enum NOT NULL
);

CREATE TABLE projects (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR(255) NOT NULL CHECK (length(trim(title)) > 0),
subtitle VARCHAR(255) NOT NULL CHECK (length(trim(subtitle)) > 0),
description VARCHAR(255) NOT NULL CHECK (length(trim(description)) > 0),
title VARCHAR(255) NOT NULL CHECK (trim(title) <> ''),
subtitle VARCHAR(255) NOT NULL CHECK (trim(subtitle) <> ''),
description VARCHAR(255) NOT NULL CHECK (trim(description) <> ''),
codeSnippet VARCHAR(200),
icon VARCHAR(50)
);

CREATE TABLE project_technologies (
project_id UUID NOT NULL,
technology VARCHAR(150) NOT NULL CHECK (length(trim(technology)) > 0),
technology VARCHAR(150) NOT NULL CHECK (trim(technology) <> ''),

PRIMARY KEY (project_id, technology),

Expand All @@ -118,7 +118,7 @@ CREATE TABLE stacks (

CREATE TABLE stack_technologies (
stack_id UUID NOT NULL,
technology VARCHAR(150) NOT NULL CHECK (length(trim(technology)) > 0),
technology VARCHAR(150) NOT NULL CHECK (trim(technology) <> ''),

PRIMARY KEY (stack_id, technology),

Expand All @@ -130,22 +130,22 @@ CREATE TABLE stack_technologies (

CREATE TABLE stats (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
yearsExperience VARCHAR(10) NOT NULL CHECK (length(trim(yearsExperience)) > 0),
systemDeployed VARCHAR(10) NOT NULL CHECK (length(trim(systemDeployed)) > 0),
uptimeSLA VARCHAR(15) NOT NULL CHECK (length(trim(uptimeSLA)) > 0),
commitsLogged VARCHAR(10) NOT NULL CHECK (length(trim(commitsLogged)) > 0),
status VARCHAR(10) NOT NULL CHECK (length(trim(status)) > 0),
objective VARCHAR(10) NOT NULL CHECK (length(trim(objective)) > 0)
yearsExperience VARCHAR(10) NOT NULL CHECK (trim(yearsExperience) <> ''),
systemDeployed VARCHAR(10) NOT NULL CHECK (trim(systemDeployed) <> ''),
uptimeSLA VARCHAR(15) NOT NULL CHECK (trim(uptimeSLA) <> ''),
commitsLogged VARCHAR(10) NOT NULL CHECK (trim(commitsLogged) <> ''),
status VARCHAR(10) NOT NULL CHECK (trim(status) <> ''),
objective VARCHAR(10) NOT NULL CHECK (trim(objective) <> '')
);

CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
username VARCHAR(15) UNIQUE NOT NULL CHECK (length(trim(username)) > 0),
name VARCHAR(15) NOT NULL CHECK (length(trim(name)) > 0),
last_name VARCHAR(15) NOT NULL CHECK (length(trim(last_name)) > 0),
email VARCHAR(255) UNIQUE NOT NULL CHECK (length(trim(email)) > 0) CHECK (position('@' in email) > 1),
username VARCHAR(15) UNIQUE NOT NULL CHECK (trim(username) <> ''),
name VARCHAR(15) NOT NULL CHECK (trim(name) <> ''),
last_name VARCHAR(15) NOT NULL CHECK (trim(last_name) <> ''),
email VARCHAR(255) UNIQUE NOT NULL CHECK (trim(email) <> '') CHECK (position('@' in email) > 1),
role role_enum NOT NULL,
password VARCHAR(255) NOT NULL CHECK (length(trim(password)) > 0)
password VARCHAR(255) NOT NULL CHECK (trim(password) <> '')
);

-- Índices
Expand Down
2 changes: 2 additions & 0 deletions k8s/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
metadata:
labels:
app: flima-backend
annotations:
rollout-trigger: "2026-05-06"
spec:
automountServiceAccountToken: false
containers:
Expand Down
2 changes: 2 additions & 0 deletions k8s/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
metadata:
labels:
app: flima-frontend
annotations:
rollout-trigger: "2026-05-06"
spec:
automountServiceAccountToken: false
containers:
Expand Down
Loading