diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index 829bdd3..0c975d8 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -21,13 +21,11 @@ jobs: java-version: '21' distribution: 'temurin' - - name: Run Tests with Maven + - name: Run Tests with Gradle run: | - echo "Installing Maven..." - apt-get update && apt-get install -y maven - echo "Starting Maven Build..." cd backend - mvn -B test + chmod +x gradlew + ./gradlew test build-and-push: needs: test-backend diff --git a/backend/Dockerfile b/backend/Dockerfile index 48f14d6..7d08ed4 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,11 +1,12 @@ # Stage 1: Build Java JAR -FROM maven:3.9-eclipse-temurin-21 AS build +FROM eclipse-temurin:21-jdk-jammy AS build WORKDIR /app -COPY pom.xml . +COPY gradle gradle +COPY gradlew build.gradle settings.gradle ./ # Download dependencies first to cache them -RUN mvn dependency:go-offline +RUN ./gradlew dependencies --no-daemon COPY src ./src -RUN mvn clean package -DskipTests +RUN ./gradlew bootJar -x test --no-daemon # Stage 2: Runtime Environment FROM eclipse-temurin:21-jre-jammy @@ -34,7 +35,7 @@ ENV SLICER_PATH="/opt/orcaslicer/AppRun" WORKDIR /app # Copy JAR from build stage -COPY --from=build /app/target/*.jar app.jar +COPY --from=build /app/build/libs/*.jar app.jar # Copy profiles COPY profiles ./profiles diff --git a/frontend/src/app/features/calculator/services/quote-estimator.service.ts b/frontend/src/app/features/calculator/services/quote-estimator.service.ts index 554263a..4bde35e 100644 --- a/frontend/src/app/features/calculator/services/quote-estimator.service.ts +++ b/frontend/src/app/features/calculator/services/quote-estimator.service.ts @@ -106,7 +106,7 @@ export class QuoteEstimatorService { return { price: Math.round(totalPrice * 100) / 100, - currency: 'EUR', + currency: 'CHF', printTimeHours: Math.ceil(totalTime / 3600), // Ceil hours materialUsageGrams: Math.ceil(totalWeight), setupCost diff --git a/frontend/src/app/features/contact/components/contact-form/contact-form.component.ts b/frontend/src/app/features/contact/components/contact-form/contact-form.component.ts index 9500fc9..e7c28c0 100644 --- a/frontend/src/app/features/contact/components/contact-form/contact-form.component.ts +++ b/frontend/src/app/features/contact/components/contact-form/contact-form.component.ts @@ -28,22 +28,27 @@ interface FilePreview {