Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cc7ad72
Configure database connection and service properties for port 8085
Nov 2, 2025
b11f2da
Create TimeLog entity with all required fields and relationships
Nov 2, 2025
1546382
Add TimeLogRepository with custom query methods for employee and date…
Nov 2, 2025
8ee4701
Add TimeLogRequest and TimeLogUpdateRequest DTOs with validation
Nov 2, 2025
8397d94
Add TimeLogResponse and TimeLogSummaryResponse DTOs for API responses
Nov 2, 2025
df03414
Implement TimeLogMapper for entity-DTO conversions
Nov 2, 2025
c60c9b2
Add custom exceptions: ResourceNotFoundException and TimeLogException
Nov 2, 2025
65eb48c
Implement GlobalExceptionHandler with ErrorResponse for consistent AP…
Nov 2, 2025
3f32f31
Add TimeLogEvent and TimeLogEventPublisher interface for future event…
Nov 2, 2025
6d53f71
Define TimeLoggingService interface with CRUD and summary operations
Nov 2, 2025
7edf076
Add TimeLogService helper class for business logic operations
Nov 2, 2025
081ac11
Implement TimeLoggingServiceImpl with full CRUD operations and summar…
Nov 2, 2025
68ef86e
Create TimeLogController with REST endpoints for time log management
Nov 2, 2025
8158ff0
Configure Spring Security with JWT authentication and CORS settings
Nov 2, 2025
9dd295b
Add database preflight check to ensure connection before application …
Nov 2, 2025
c73495c
Implement DataSeeder to populate database with sample time log entries
Nov 2, 2025
7b4ca05
Add comprehensive README with API documentation and usage examples
Nov 2, 2025
18c44a9
Add automated testing scripts for endpoints and build validation
Nov 2, 2025
b846ca1
Add HOW_TO_RUN and QUICK_START guides for easy service setup
Nov 2, 2025
fac6226
Document solutions for port conflicts, builder patterns, and getter i…
Nov 2, 2025
78a023c
Add comprehensive fix summary and issue resolution tracking
Nov 2, 2025
d306e7c
Add database setup guide and connection documentation
Nov 2, 2025
06762e5
Add comprehensive status reports for database, endpoints, and overall…
Nov 2, 2025
e861ecf
Add submission checklist to track project completion requirements
Nov 2, 2025
25151f1
Merge pull request #3 from TechTorque-2025/dev_timelog
RandithaK Nov 5, 2025
78db965
build: Update dependencies and project configuration
RandithaK Nov 5, 2025
f3fa67a
feat: Add OpenAPI/Swagger configuration
RandithaK Nov 5, 2025
869fe32
feat: Add shared constants for cross-service consistency
RandithaK Nov 5, 2025
ea6fc19
refactor: Update data seeder with fixed UUIDs
RandithaK Nov 5, 2025
e875fbc
feat: Add comprehensive exception handling
RandithaK Nov 5, 2025
a4df500
feat: Enhance time logging controller with comprehensive endpoints
RandithaK Nov 5, 2025
2587163
refactor: Remove deprecated TimeLoggingController
RandithaK Nov 5, 2025
3bb50c0
feat: Implement complete time logging business logic
RandithaK Nov 5, 2025
3fa771a
test: Add test configuration
RandithaK Nov 5, 2025
e1279c3
test: Update application tests
RandithaK Nov 5, 2025
ce1ad42
docs: Add comprehensive documentation and quick start guide
RandithaK Nov 5, 2025
59f7d7f
feat: Enhance security handling with custom access denied responses
RandithaK Nov 5, 2025
83cac5b
feat: Update security configuration to enable authentication by default
RandithaK Nov 5, 2025
7b889fd
feat: Enhance time log access control for admins and implement getAll…
RandithaK Nov 6, 2025
2401374
Merge pull request #4 from TechTorque-2025/integration_bug_fixes
RandithaK Nov 6, 2025
bad2dce
feat: Add GitHub Actions workflows for building, packaging, and deplo…
RandithaK Nov 8, 2025
a4ef97e
feat: Add Dockerfile for building and running the microservice
RandithaK Nov 8, 2025
3552f41
Merge pull request #5 from TechTorque-2025/devOps
RandithaK Nov 8, 2025
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
89 changes: 89 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build and Package Service
on:
push:
branches:
- 'main'
- 'devOps'
- 'dev'
pull_request:
branches:
- 'main'
- 'devOps'
- 'dev'

permissions:
contents: read
packages: write

jobs:
build-test:
name: Install and Build (Tests Skipped)
runs-on: ubuntu-latest

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

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

- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Build with Maven (Skip Tests)
run: mvn -B clean package -DskipTests --file time-logging-service/pom.xml

- name: Upload Build Artifact (JAR)
uses: actions/upload-artifact@v4
with:
name: time-logging-service-jar
path: time-logging-service/target/*.jar

build-and-push-docker:
name: Build & Push Docker Image
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/devOps' || github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
needs: build-test

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

- name: Download JAR Artifact
uses: actions/download-artifact@v4
with:
name: time-logging-service-jar
path: time-logging-service/target/

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/techtorque-2025/timelogging_service
tags: |
type=sha,prefix=
type=raw,value=latest,enable={{is_default_branch}}

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy Time Logging Service to Kubernetes

on:
workflow_run:
workflows: ["Build and Package Service"]
types:
- completed
branches:
- 'main'
- 'devOps'

jobs:
deploy:
name: Deploy Time Logging Service to Kubernetes
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

steps:
- name: Get Commit SHA
id: get_sha
run: |
echo "sha=$(echo ${{ github.event.workflow_run.head_sha }} | cut -c1-7)" >> $GITHUB_OUTPUT

- name: Checkout K8s Config Repo
uses: actions/checkout@v4
with:
repository: 'TechTorque-2025/k8s-config'
token: ${{ secrets.REPO_ACCESS_TOKEN }}
path: 'config-repo'
ref: 'main'

- name: Install kubectl
uses: azure/setup-kubectl@v3

- name: Install yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq

- name: Set Kubernetes context
uses: azure/k8s-set-context@v4
with:
kubeconfig: ${{ secrets.KUBE_CONFIG_DATA }}

- name: Update image tag in YAML
run: |
yq -i '(select(.kind == "Deployment") | .spec.template.spec.containers[0].image) = "ghcr.io/techtorque-2025/timelogging_service:${{ steps.get_sha.outputs.sha }}"' config-repo/k8s/services/timelogging-service-deployment.yaml

- name: Display file contents before apply
run: |
echo "--- Displaying k8s/services/timelogging-service-deployment.yaml ---"
cat config-repo/k8s/services/timelogging-service-deployment.yaml
echo "------------------------------------------------------------"

- name: Deploy to Kubernetes
run: |
kubectl apply -f config-repo/k8s/services/timelogging-service-deployment.yaml
kubectl rollout status deployment/timelogging-service-deployment
Loading
Loading