diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 997894c322fef088a7ff37136b44d788d0aab02e..f4cf0363869ac87d4678fca98195eadb53dbc62f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,29 +1,24 @@ +image: maven:eclipse-temurin + +before_script: + - cd FullstackProsjekt + stages: -- ".pre" -- build -- test -- deploy -- ".post" -build-job: + - build + - test + - package + +build: stage: build script: - - echo "Compiling the code..." - - echo "Compile complete." -unit-test-job: + - mvn compile + +test: stage: test script: - - echo "Running unit tests... This will take about 60 seconds." - - sleep 60 - - echo "Code coverage is 90%" -lint-test-job: - stage: test - script: - - echo "Linting code... This will take about 10 seconds." - - sleep 10 - - echo "No lint issues found." -deploy-job: - stage: deploy - environment: production + - mvn clean test + +package: + stage: package script: - - echo "Deploying application..." - - echo "Application successfully deployed." + - mvn clean package diff --git a/FullstackProsjekt/pom.xml b/FullstackProsjekt/pom.xml index 58e2066d59c09afdc60f8b039fbca4727cf89da0..f0793596aef3af99423917ffc02ed70eb820acc5 100644 --- a/FullstackProsjekt/pom.xml +++ b/FullstackProsjekt/pom.xml @@ -71,6 +71,9 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <mainClass>edu.ntnu.idatt2105.FullstackProsjektApplication</mainClass> + </configuration> </plugin> </plugins> </build>